in reply to Re6: Idiomatic optimizations
in thread Idiomatic optimizations
HOWEVER, scrutinizing the Benchmark code reveals that *it* in fact string evals.
I don't see how it can possibly get something useful out of a sub reference's stringification, but I'm too lazy to look at Benchmark's source. Let's try something different:
What does that show on your system?#!/usr/bin/perl -w use Benchmark qw(cmpthese); sub single { $foo = 'foo' } sub double { $foo = "foo" } cmpthese (10000000, { single => sub { single() }, double => sub { double() } });
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re2: Re6: Idiomatic optimizations
by belg4mit (Prior) on May 01, 2002 at 21:13 UTC |