]> git.lizzy.rs Git - dragonfireclient.git/commit
Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 29 Apr 2017 18:36:09 +0000 (20:36 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Apr 2017 18:36:09 +0000 (20:36 +0200)
commit95409da87d009c352f27c737621972c2225796c9
treec7ba89f77a18316f33cd71637398ae3f0f86bf0d
parentc729543ec4ab5cba167b97f0b8c796de3de88a26
Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)

* Optimize updateFastFaceRow processing by removing some TileSpec copy

It permit to decrease this function from 54% runtime to 45% and reduce copy from 14% runtime to 12.5%
getTileInfo also reduced from 27% to 23%

* makeFastFace should use a const ref too

this trigger a const pointer need in the underlying function

Also fix some code style and prevent calculating 4 times the same position at a point

* Reduce a comparison cost for lights in updateFastFaceRow
src/content_mapblock.cpp
src/content_mapblock.h
src/mapblock_mesh.cpp
src/mapblock_mesh.h