Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

GetFunctionIDBy* speed


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Dentoid   Members   -  Reputation: 122

Like
0Likes
Like

Posted 15 June 2004 - 11:09 AM

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

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3356

Like
0Likes
Like

Posted 15 June 2004 - 01:26 PM

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

#3 Dentoid   Members   -  Reputation: 122

Like
0Likes
Like

Posted 16 June 2004 - 09:16 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS