#3059: 3 different behaviours depending on profiling settings and on a
used-only-
once form being top-level
----------------------+-----------------------------------------------------
Reporter: jkff | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Windows | Architecture: x86
----------------------+-----------------------------------------------------
Comment (by ChrisKuklewicz):
I have investigated further. The problem is that the regex-tdfa-1.0.0
code is just too generic. For example: the test above will take the Lazy
ByteString and convert it to a String for searching. The text just needs
to be tested, and yet the engine will try and find the best Posix match
including captures.
An optimized Strict Bytestring version (will be in regex-tdfa after
1.0.0), using the test like
http://haskell.org/haskellwiki/?title=Regular_expressions#Sample_benchmark
gives:
Old:
pamac-cek10:compare-tdfa chrisk$ time ./wiki-1.0.1-sbs wiki 1000000
Test for Data.ByteString.Internal.ByteString
Right 1000000
real 0m22.692s
user 0m5.352s
sys 0m0.195s
New:
pamac-cek10:compare-tdfa chrisk$ time ./wiki-1.0.1-sbs-v2 wiki 1000000
Test for Data.ByteString.Internal.ByteString
Right 1000000
real 0m0.714s
user 0m0.159s
sys 0m0.017s
So that is at least a thirty-fold improvement.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3059#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs