File: bless.pl

package info (click to toggle)
libclass-std-fast-perl 0.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: perl: 575; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package SomeClass;
package main;
use strict;
use Benchmark qw(timethese timethis cmpthese);
my $id = 1;

our $ID = \$id;
my @data; 

sub new { my $self = bless \ do{ my $o= ${ $ID }++}, shift; return $self;} 

timethis 1000000, sub { my $data = new( 'SomeClass' ) };

print "Pentium M (Dothan), 1,7GHz rate: 653594/s\n";