Talk:Tokenize a string with escaping: Difference between revisions

Line 15:
 
: Thanks, your point about efficiency at scale is interesting and well taken. This task doesn't specify performance at scale, and I think it can be useful to also show the 'simplest' (or most naive :-) single fold solution, but I appreciate your having documented the issue. Very happy to remove for the moment and experiment. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 09:47, 12 January 2017 (UTC)
 
:: UPDATE now tweaked for performance at scale (perhaps also worth experimenting, if performance were a concern, with replacing foldl with foldl' ? It's a pity that the Wiki software misinterprets that single quote as a string quote).
:: Seems now to be fractionally faster (with a few thousand lines of text) than the DFA version at the top of the Haskell section - possibly just because it uses a single reverse at the top, outside the helper function, in lieu of <code>reverse . map reverse</code>. Many thanks for your helpful feedback ! [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 11:14, 12 January 2017 (UTC)
9,655

edits