gpolak / LFHeatMap

Extremely fast iOS heat maps
MIT License
391 stars 49 forks source link

[UPD] Some speed optimizations #1

Closed micazeve closed 10 years ago

micazeve commented 10 years ago

Hi ! I have already worked on heatzone images, so I added some optimisations in your class. When you fill the RGBA buffer, some tests can be avoided in order to save some time, by initializing the RGBA buffer to 0. Second "optimization" was to remplace the time-consuming array shifting by setting the weight to a negative value and testing the weight. The tests are also time-consuming but it looks faster.