GetFunctionIDBy* speed

Started by
1 comment, last by Dentoid 19 years, 10 months ago
Hi I'm just wondering if there's a reason the functions are internally just stored in a list, and this list is searched linearly when calling GetFunctionIDBy*? This quickly gets very slow if the number of functions increases. I'm currently caching the lookups, but still due to different reasons have to redo them every once in a while, so I'd really love if it could be stored in a hashmap or something for faster lookups. /Anders Stenberg
Advertisement
The main reason is laziness from my part. I haven't given it much priority because the id really should be cached between calls.

I will probably change the list to use std::map when I find the time.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Okay. I could cache it better myself, but I think having a map in AngelScript itself is something everyone would benefit from. If I eventually implement it myself, I will share. :)

/Anders Stenberg

This topic is closed to new replies.

Advertisement