> ( ... ) > On my PPro 200 Linux box I was able to sort 1.000.000 ^^^^^^^^ ^^^^^^^^ > ( ... ) > After some profiling I got it down to 79 seconds making > one trivial change. Of the 79 seconds most is spent > in memcmp. About 130 MB was used for this test and ^^^^^^ ^^^^^^ > ( ... ) > > used the Sort() method in the TOrdCollection class but it seems VERY > > slow. It took about 400 CPU second on a Dec Alpha to sort a ^^^^^^^^^ ^^^^^^^^^ I'm not an expert in Dec Alphas, but I thing this machine cannot access bytes in memory ( ram ) directly, as can Intel processors. Thus all string/bytes/bits manipulation functions are slower then one might expect, because it reads long words ( or even 128-bits ), then does "masking" to get the proper byte, then maybe shifts bits, then does the "cmp", ... . If you try "profiling" ... maybe you'll find that the memcmp takes most of the time ... . Jacek.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:19 MET