Page MenuHomeWildfire Games

TileClass optimization.
Needs ReviewPublic

Authored by nani on Sep 22 2018, 1:14 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Optimized TileClass noticing that there were some unnecessary calculations.
All scripts in rmgen only use it to know if a tile is inside or not inside a radius around some tile, making it unnecessary the counting all the tiles inside given radius.

Uses BoolArray to improve up search and memory.
https://code.wildfiregames.com/D1637

This also fixes inconsistency between the >= 27 case and normal algorithm. @elexis

Also worth discussing if RangeOp is to be kept or no for there is still no use case.

Test Plan

Testing various maps.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

nani created this revision.Sep 22 2018, 1:14 AM
nani created this object with visibility "nani".
nani edited the summary of this revision. (Show Details)Sep 22 2018, 5:44 PM
nani changed the visibility from "nani" to "Public (No Login Required)".Sep 22 2018, 5:54 PM

Checked the performance benefit of the proposed early-return in TileClass: P142