>From: Christian Biere <[EMAIL PROTECTED]>
>Date: Sat, 18 Nov 2006 08:30:50 +0100
>
>Lloyd Bryant wrote:
> > No sort: 21.3 sec (0 ms sorting)
> > g_slist_sort: 21.2 sec (475ms sorting)
> > sort_slist_with_qsort: 21.1 sec (128ms sorting)
> > SVN r12351: (393ms sorting)
>
>It's fairly impossible that sort_slist_with_qsort() is faster than
>sorting table because it's the same as sorting the table plus
>mapping the list to the table and back to the list.
>
I'm going to assume it was a bogus result. But it sure did *look* good....
>The two assertion checks I added to the sorting function almost
>double the sorting time for me. That's not suprising and it could
>be much worth depending on the CPU and the compiler flags. If
>this overhead is of any concern, we can simplify the checks.
>
With the 100K file test results, I don't see any real reason to worry about
it. Less than half a second for that many files on an obsolete machine
should meet anyone's definition of "good enough".
FYI- I'm currently testing some more changes in share.c, but not related to
the sort (I spotted some weirdness in recurse_scan_intern(), such as the
fact that it was stat'ing or lstat'ing each file a total of three times,
which I thought was a bit silly.). I'll post something when I have it
adequately tested.
After restructuring things a bit, I think I see a place where we can load
the SHA1's from cache well before the sort. I still need to think about
that, though, as without a valid sf->file_index, I'm not sure this is going
to be much use.
Question (if anyone knows): Is there a reason that shared_file carries the
SHA1 as part of the structure, rather than a pointer to the sha1_cache
entry? At first glance that looks like a good way of linking the two, but I
haven't dug deeply enough into other parts of the program to know if there
are reasons for the isolation.
Lloyd Bryant
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel