in reply to Python regex faster than Perl?
One performance nit (for both versions really) if you're going for speed then reading and processing line by line rather than slurping is going to probably be faster (regardless of language, unless there's some magic (e.g. mmap the file contents into a language level string)) than slurping the entire file into memory.
Edit: Huh I may be out of date now. My recollection was that rule of thumb was the "best" (FSVO best aiming for speed) way to do something like this was line-by-line or reads at the underlying FS' block size.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Python regex faster than Perl?
by choroba (Cardinal) on Mar 26, 2025 at 16:37 UTC |