Menu

#13 smell processing performance is sub-optimal

open
nobody
5
2007-04-14
2007-04-14
Scott Yokim
No

Smell processing currently calls line 114 of sensation.cpp thousands of times per minute. The red/black tree implementation invoked by this line is costly. So currently smell processing is disabled via simconfig.def file. (Novamente is not currently testing smell capability.)

Suggested fixes for this performance problem are:

1. Keep a separate list for objects that have significant smell. Then line 114 would be called only tens of times per minute. (The loop in SmellSensor::Update() would loop far less.) (Also move the getPosition() call out of the loop.)

2. Use a hash map to keep the objects instead of a map.

3. Ensure WINTENSITY is always upper case, so there is no need for the expensive toupper() function to be used.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB