[Issue 7471] Improve performance of std.regex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 26 06:32:34 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7471



--- Comment #5 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2012-02-26 06:32:30 PST ---
Anyway how compares of 2.056-2.058 when you don't create regex objects inside
tight loop?
It is a strange thing to do at any circumstances, even N-slot caching you pay
some extra on each iteration to lookup and copy out the compiled regex needed.

I'm dreaming that probably one day the compiler can just see it's a loop
invariant and move it out for you. 
Hm.. could happen sometime soon if 'regex' is pure and then it's result is
immutable, the compiler would have it's guarantees to go ahead and optimize.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list