--- linuxsampler/trunk/src/scriptvm/parser_shared.h 2020/11/09 10:18:55 3835 +++ linuxsampler/trunk/src/scriptvm/parser_shared.h 2020/11/28 14:47:14 3836 @@ -27,6 +27,13 @@ union { LinuxSampler::vmint iValue; LinuxSampler::vmfloat fValue; + // Intentionally using C-strings instead of std::string for parser's + // string tokens, because any destructor based class had a negative + // impact on parser performance in benchmarks. Reason for this is that + // text tokens are the most common one while parsing, plus the parser + // copies the YYSTYPE struct a lot (i.e. when shifting). For C-strings + // coming directly from Flex, we don't have to free them. For C-strings + // allocated by us, use yyextra->autoFreeAfterParse(s); char* sValue; struct { LinuxSampler::vmint iValue;