View mode: basic / threaded / horizontal-split · Log in · Help
February 01, 2007
Re: how to be faster than perl?
Mr. Medlock,
D will compile regexp too. Mr. Bommel has already explained that in one of his replies...

Kind regards

Dejan
February 01, 2007
Re: how to be faster than perl?
Dejan Lekic wrote:
> Mr. Medlock,
> D will compile regexp too. Mr. Bommel has already explained that in one of his replies...

Well, AFAIK std.regexp only compiles to a bytecode that is then 
interpreted for every operation on it. (I have no idea what Perl does 
exactly, so it may be something similar, but I just thought I'd clear 
that up)


P.S. If you want to get formal, it's 'Mr. van Bommel', the 'van' is part 
of my surname.
February 01, 2007
Re: how to be faster than perl?
Dejan Lekic wrote:
> Mr. Medlock,
> D will compile regexp too. Mr. Bommel has already explained that in one of his replies...
> 
> Kind regards
> 
> Dejan
I know that.

I was talking about recompiling each time through the loop.

In python you would say:

pat = re.compile( "horizontal" )

then use pat within your loop.

-DavidM
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home