in reply to Benchmarking chop/substr/split
Well, I bet it would be possible to teach Perl to optimize substr($str,-1) (when not being assigned to and when the "-1" is a literal constant) into chop. But then, why? That is, would the bit of bloat (and the potential for introducing bugs) be worth allowing people to write chop long-hand without the performance penalty?
BTW, they are all close enough to the same speed that I don't think I'd ever worry about the speed difference. (:
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Benchmarking chop/substr/split
by larryl (Monk) on Mar 17, 2001 at 02:15 UTC | |
by tye (Sage) on Mar 17, 2001 at 02:19 UTC |