• Advertisement
Sign in to follow this  

GetFunctionIDBy* speed

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement