Pack your strings NOW -
Crystallize - 30.07.2017
Recently I was searching in samp wiki and I found this
https://sampwiki.blast.hk/wiki/Strpack
I was like lets open it and see what it is then I found "Packed strings" I never knew about this before the good about it is once you pack the string it will use 75% less memory according to samp wiki so imagine the big scripts that uses many strings with 128,326 bytes etc...
An example you can take from samp wiki
Код:
new string[32 char];
strpack(string, "Hi, how are you?");
Later on I will update my thread with more information on how to pack your actual commands because now I need to experiment a bit with it :P sorry guys I know this isn't even a tutorial just thought I could share because not many people know about this.
Re: Pack your strings NOW -
TopShooter2 - 30.07.2017
Good shit.
Re: Pack your strings NOW -
Vince - 30.07.2017
Should've posted in Discussion forum. Anyway, I don't think it's worth the additional processing overhead unless I have a large array of strings. Also it's useless for any language that doesn't (exclusively) use the common Latin alphabet.
Re: Pack your strings NOW -
Freaksken - 30.07.2017
https://sampforum.blast.hk/showthread.php?tid=480529
Re: Pack your strings NOW -
Thomas. - 30.07.2017
Unfortunately most functions from the standard Pawn libraries (also including user defined functions) and SA:MP natives are not compatible with packed strings.
Re: Pack your strings NOW -
C4rtm4n - 01.08.2017
It's more for the USEFUL CODE
Re: Pack your strings NOW -
ISmokezU - 04.08.2017
Searching for it, it's been brought up before
Something like:
http://forum.sa-mp.com/showpost.php?...21&postcount=7
Turns me off about it.
So it has some (Dis)advantages like every other thing.
Re: Pack your strings NOW -
Hansrutger - 04.08.2017
Bt memrosay is sе impotant rin 2k17
(
Good thought, but I'd rather write simpler code than saving something I don't have to save, then again maybe this becomes really important for someone who chooses to buy the cheapest VPS out there with slightly bad resources.
Re: Pack your strings NOW -
Spmn - 04.08.2017
Quote:
Originally Posted by Hansrutger
Bt memrosay is sе impotant rin 2k17 (
Good thought, but I'd rather write simpler code than saving something I don't have to save, then again maybe this becomes really important for someone who chooses to buy the cheapest VPS out there with slightly bad resources.
|
Didn't know 64mb RAM VPSes are still a thing xD
Re: Pack your strings NOW -
Kaperstone - 09.08.2017
https://sampforum.blast.hk/showthread.php?tid=480529
But I still find it unnecessary, I'm ready to sacrifice few kb's for less headache whether my string is packed or not