std.regex performance
Dmitry Olshansky
dmitry.olsh at gmail.com
Thu Feb 9 01:33:10 PST 2012
On 09.02.2012 3:35, Jesse Phillips wrote:
> On Wednesday, 8 February 2012 at 22:21:35 UTC, David Nadlinger wrote:
>> On 2/8/12 10:44 PM, Jesse Phillips wrote:
>>> foreach(w; std.string.split(readText(name)))
>>> if(!match(w, regex(r"\d")).empty)
>>> {}
>>> }
>>
>> Could it be that you are rebuilding the regex engine on every
>> iteration here?
>>
>> David
>
> That is the case. The older regex apparently cached the last regex. will
> be more careful in the feature.
I suggest to file this as an enhancement request, as new std.regex
should have been backwards compatible.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list