SA-MP Forums Archive
Using vectors & maps - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Using vectors & maps (/showthread.php?tid=444889)



Using vectors & maps - Maxips2 - 18.06.2013

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.


Re: Using vectors & maps - Macluawn - 18.06.2013

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.


Re: Using vectors & maps - Maxips2 - 22.06.2013

Bump. I would like to hear more opinions.


Re: Using vectors & maps - Maxips2 - 22.06.2013

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.