void main(int argc, array(string) argv) { int i, c = 0; int n = (int)argv[-1]; if (n < 1) n = 1;
mapping(string:int) X = ([]);
for (i=1; i<=n; i++) { X[sprintf("%x", i)] = i; } for (i=n; i>0; i--) { if (X[(string)i]) c++; } write("%d\n", c); }
/ Martin Nilsson (saturator)
Previous text:
2003-12-03 11:24: Subject: Pike benchmarks
Is that with the new version of the hash-test I wrote some years ago, or the old one using indices() and values()?
/ Per Hedbor ()