Ah. The deprecated hash1-test. Try the hash2 test, that is not really a sprintf-test.
/ Per Hedbor ()
Previous text:
2003-12-03 11:27: Subject: Pike benchmarks
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)