[padb-devel] [padb] r254 committed - Improve the performance by a factor of ten by changing the sort algori...
codesite-noreply at google.com
codesite-noreply at google.com
Tue Sep 15 13:07:46 BST 2009
Revision: 254
Author: apittman
Date: Tue Sep 15 05:07:01 2009
Log: Improve the performance by a factor of ten by changing the sort
algorithm. Note it's
not the sort that gets quicker but rng_add_value() has a much simpler job
to do if
it's extending ranges rather than adding to the middle of them.
http://code.google.com/p/padb/source/detail?r=254
Modified:
/branches/cleanup/src/padb
=======================================
--- /branches/cleanup/src/padb Tue Sep 15 04:34:35 2009
+++ /branches/cleanup/src/padb Tue Sep 15 05:07:01 2009
@@ -3332,7 +3332,7 @@
my ($lines) = @_;
my %tree;
debug_log( 'tree', undef, 'Making the tree' );
- foreach my $tag ( sort keys %{$lines} ) {
+ foreach my $tag ( sort { $a <=> $b } keys %{$lines} ) {
add_tag_to_tree( \%tree, $tag, $lines->{$tag} );
}
debug_log( 'tree', undef, 'Formatting the tree' );
More information about the padb-devel
mailing list