develooper Front page | perl.perl5.porters | Postings from October 2001

Re: Clamp, wherefor art thou

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
October 30, 2001 11:17
Subject:
Re: Clamp, wherefor art thou
Message ID:
20011030211644.K32699@alpha.hut.fi
What I'd like to see is at least two separate patches:

(1) Adding the SvREADONLY logic for hashes *and* arrays (if we want to
    benchmark, we better see the full effect)  I think this is pretty
    non-controversial, just a simple extension of the current semantics.
    (Simon has not yet commented on why he feels none(?) of this should
    be part of the core.)

    As for benchmarking, one can always use Gisle's perlbench.
    Or simply benchmark each of:

	@k = "aaa"..."zzz"; # just setup
	@q = "AAA"..."ZZZ"; # just setup

	%h = ();
	@h{@k} = @q;
	@K = keys   %h;
	@V = values %h;
	while (($k, $v) = each %h) { }
	exists $h{$_} for @k;
	exists $h{$_} for @q; # no hits
	delete $h{$_} for @k;
	@h{@k} = ();
	delete @h{@q}; # no hits
	delete @h{@k};
	@h{@k} = ();
	undef %h;

    and stare at the numbers, before and after the patch.

(2) The allowable set of keys.
    (I also have to agree with Nick that 'clamp' doesn't do it for me.)

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About