Raised This Month: $49 Target: $400
 12% 

Packed vs. Unpacked Strings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-14-2019 , 22:43   Packed vs. Unpacked Strings
Reply With Quote #1

Hello, there has been some change from 2009 to here on the subject "Packed vs. Unpacked Strings", I read the tutorial and found it interesting, but I believe I have never seen anyone using ... is there still the limitation regarding MOTD and native amx? Did you have an update? And the main question why no one uses? Thank you.

Here the link

https://forums.alliedmods.net/showthread.php?t=90735
__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 05-15-2019 , 07:11   Re: Packed vs. Unpacked Strings
Reply With Quote #2

Because all natives/functions that accept strings would have to be re-coded to support packed strings, and there's really no reason for it. Nobody uses it now because it's just pain in the ass to use it. Yes, it's more memory efficient, but it really doesn't matter.
__________________

Last edited by KliPPy; 05-15-2019 at 07:11.
KliPPy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-17-2019 , 22:12   Re: Packed vs. Unpacked Strings
Reply With Quote #3

Pretty much on the same page with Klippy. Since the AMX-X natives do not support them, all of the effort you would need to do to pack it, unpack it to send it to a native, and then re-pack it, you are wasting CPU resources just to reduce your array size to hold a string, not worth it. When and if the natives can use them, then definitely will be worthwhile. I believe SourceMod uses them, but not sure.

When I wrote that thread, I wasn't taking this into consideration, just focused on the memory savings.
__________________

Last edited by Bugsy; 05-17-2019 at 22:13.
Bugsy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:39.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode