10.11.2011, 19:00
Hi
I just thought about creating a custom precompiler for pawn that would make life a tiny bit easier for scripters. My original idea was to let the precompiler hash all strings that are marked with some sign (e.g. $"stringstring"). You would rename the default pawncc.exe to pawncc2.exe and install the custom precompiler as pawncc.exe. This would then replace all those strings with their hashed value in a temporary file and compile that file using pawncc2.exe.
This way you wouldnt need to use hash("stringstring") (for things like fast command text comparison), which would hash the string in runtime and so eats some time.
However this alone wouldnt pay out as an independent precompiler. I also thought about adding some optimization tweaks like chaning constant integers to constant floats in flaot calculations and all such small stuff.
There isnt a single line of code for this yet, I just wanted to ask if there would be anyone interested in this, or if someone has more ideas for this. So what do you think?
I just thought about creating a custom precompiler for pawn that would make life a tiny bit easier for scripters. My original idea was to let the precompiler hash all strings that are marked with some sign (e.g. $"stringstring"). You would rename the default pawncc.exe to pawncc2.exe and install the custom precompiler as pawncc.exe. This would then replace all those strings with their hashed value in a temporary file and compile that file using pawncc2.exe.
This way you wouldnt need to use hash("stringstring") (for things like fast command text comparison), which would hash the string in runtime and so eats some time.
However this alone wouldnt pay out as an independent precompiler. I also thought about adding some optimization tweaks like chaning constant integers to constant floats in flaot calculations and all such small stuff.
There isnt a single line of code for this yet, I just wanted to ask if there would be anyone interested in this, or if someone has more ideas for this. So what do you think?