• Well,

    that's indeed an interesting finding, but I doubt that it would have a significant effect on performance:

    • computeDiffusion does a lot of computations and rounds in the end only - replacing it by + 0.5 and relying on internal truncation and clamping would probably not be faster but less intuitive. However, rounding (of small values) is important for the final display any may therefore not just be omitted completely
    • computeHeating does not have any noticeable effect on the overall speed (it deals with 16 pixels only, not 256)
    • prepareDisplay rounds indices into an array only - and this cannot be omitted as you may easily test yourself

      var Test = [0,1];

    outputs undefined rather than 0 or 1.

    Anyway, thanks for your effort!