
Hi, Am Dienstag, den 19.05.2015, 15:19 +1000 schrieb Clinton Mead:
However GHC 7.10.1 compiles the list away, so the list version, stream version, and accumulating parameter recursive function version now all run in the same time.
glad to hear that (I believe I am partly responsible for that). But
If GHC continues to learn to optimise away lists effectively, [Char] may not be a performance issue after all.
is too optimistic. [Char] will never be a good choice for efficient string manipulation; the optimizations you mention only work in very specific circumstances (at least: lists used exactly once, by a “good consumer” and produced by a “good producer”). The sufficiently smart compiler continues to be an utopia. (Which does not stop us from working towards it.) Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org