in reply to Schwartzian Transform vs. plain Perl
In your benchmarks, there is no "expensive_func". Yes, the hash lookup is a bit more expensive than the array lookup, but not that expensive. The expense of the extra map() is greater than the savings realized by doing the array lookup.
To reap the benefits of the Transform, do something real - like stat some rapidly changing file on your filesystem
HTH,
mikfire
|
|---|