Frixuu / ToString

Haxe macro for autoimplementing toString (and other string-related tools).

Home Page:https://lib.haxe.org/p/tostring/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

addMultilines split is it fast?

nanjizal opened this issue · comments

addMultilines uses 'split', since it is a low level tool maybe worth checking if a char code parser is faster for some targets, believe it probably was in the past, a try haxe test here explaining.
https://gist.github.com/nanjizal/de65e05cec13d751bcd8988e61131000

I can't comment on the macros approach, as I have only used macros a few times.

commented

Hi!

Thanks for bringing it to my attention! It seems like the performance characteristics of such a parser vs string.split() are all over the place - on my machine, with Haxe 4.3.1, a custom parser like that is 30% faster on C++, 10% slower on HashLink and 20 TIMES slower on JS.

Will definitely take a closer look at it, maybe also compare it to a regex-based solution?