[SVN] Revision 895 (PHP)
Mats Persson
mats at imediatec.co.uk
Fri May 13 15:06:57 UTC 2005
On 12 May 2005, at 22:19, Allan Odgaard wrote:
>> Does anyone know if it would speed things up to define all
>> function keywords in one big match instead of how they were,
>> separated by category [...]
> Probably wouldn't really help. The reason it's slow is:
> 1) type abstraction (regex works on iterators instead of raw storage)
> 2) double dispatch using virtual methods to have type neutrality
> between NFA and storage
> 3) no optimizations done in the actual regex lib (like using
> bitmaps for character classes, collapsing literal nodes, switching
> to (sub) linear time searches for trivial sequences a.s.o.)
>
> Crafting the regular expressions differently may give some, like in
> the obj-c case which gave ~25%, but the things above are likely
> costing a 30-50 times overhead, meaning changing this is the only
> way to reach reasonable speeds for the 1000+ PHP functions.
And Allan, in his eminently capable style lost me completely there,
but I hope my translation (= "things will get faster soon-ish, when
Allan has done more of his normal magic") is correct. ;-) Please
correct me if I'm wrong.
> meaning changing this is the only way to reach reasonable speeds
> for the 1000+ PHP functions.
What's "this" referring to ? (I assume TM's internal regexp stuff,
but is perhaps wrong)
Kind regards,
Mats
----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
More information about the textmate-dev
mailing list