Using vectors & maps
#1

Lately I've been interested in this plugin: http://forum.sa-mp.com/showthread.ph...highlight=CSTL

I was thinking about using vectors & maps for things like houses, vehicles, etc'. Instead of using enumerators.
There are quite a few advantages which I could think of: dynamic memory (no more MAX_VALUE), less memory usage (it would only use memory for actually used items).

But I think it would be much slower.

What do you guys think?

Edit: Not sure if this topic should be posted in Discussions.
Reply
#2

Of course it will be slower, but the difference gap isnt that big, so its bearable.
Pros outweigh the cons.

btw, this (clickclick) has also deque and multimap.
Reply
#3

Bump. I would like to hear more opinions.
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Why not run some tests?
Well my intention was to hear from people what do they think about this idea of using vectors & maps instead of enumerators, if it would even be practical on big mods or at all.

About speed, I'm not quite sure how to run a "fair" test.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)