Does blitzmax optimize inline strings?

BlitzMax Forums/BlitzMax Programming/Does blitzmax optimize inline strings?

skn3(Posted 2012) [#1]
If I were to define ten globals initialised with "hello world", would blitzmax optimize this and only store "hello world" string once as a constant?

I ask because if blitzmax doesn't do this I will optimize all my strings initialisations into constants.

Last edited 2012


Yasha(Posted 2012) [#2]
Yes, it does.

You can verify this by looking at the assembly output (the .s file in the automatically-generated .bmx folder).


skn3(Posted 2012) [#3]
Hey Yasha,

Thanks for the quick response, just had a look and your right :D Hadn't looked at those files before!