Raised This Month: $ Target: $400
 0% 

Is strlen of constants optimized?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Forlix
Senior Member
Join Date: Dec 2008
Location: Hamburg, Germany
Old 12-30-2008 , 12:59   Is strlen of constants optimized?
Reply With Quote #1

Does the SourcePawn compiler optimize strlen calls with constant strings, eg. calculate the length at compile time?
Forlix is offline
Send a message via ICQ to Forlix Send a message via MSN to Forlix
zerak
Senior Member
Join Date: Feb 2008
Old 12-30-2008 , 14:11   Re: Is strlen of constants optimized?
Reply With Quote #2

my guess is sizeof gives that effect but I might be wrong
zerak is offline
Kigen
BANNED
Join Date: Feb 2008
Old 12-31-2008 , 03:54   Re: Is strlen of constants optimized?
Reply With Quote #3

If Source follows C style code strlen should not be optimized, however sizeof() should be. But I don't know really.
Kigen is offline
Reply



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 02:42.


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