summaryrefslogtreecommitdiff
path: root/next-lib
diff options
context:
space:
mode:
authorbjorn <bjorn@bringert.net>2008-11-26 16:19:54 +0000
committerbjorn <bjorn@bringert.net>2008-11-26 16:19:54 +0000
commit720932d75120a86e99f0dec32d3335aaba65e4a6 (patch)
treecf8760747857e855e57fe4e030752c27ddb59e45 /next-lib
parent5dee98234e3df45d30f4aa6048bbd39c26d7af43 (diff)
Don't use string sharing in LexGF.
Profiling showed that when loading a large .gfo file, shareString was responsible for 15-18% of the CPU time, and a lot of the allocation. Since we already use ByteStrings for reading the source files, shareString mostly has the effect of creating lots of small ByteStrings instead of one large one. Since the plain size of the .gfo is seldom a problem (unlike when it was read as a String), it is ok to keep the whole file as one ByteString in RAM, and have all tokens point into that. Profiling after the change showed 15-20% reduction in CPU time and in total allocation.
Diffstat (limited to 'next-lib')
0 files changed, 0 insertions, 0 deletions