From 6dc60370a750334cb701386cfa4ef9719db9078a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 30 Mar 2010 12:38:38 +0200 Subject: replace every call to toupper with one to our own tolower_ascii This sounds like a premature optimization and since Mr. Knuth we all know that they are the root of all evil - but, and here it starts to be interesting: As the tolower_ascii method is by far the most called method we have (~60 Mio. times) and as we compare only strings containing ascii characters (package names, configuration options) using our own method reduces execution time of APT by 4% plus it avoids that the locale settings can influence us. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 17affee4f..bd1fda316 100644 --- a/debian/changelog +++ b/debian/changelog @@ -60,6 +60,8 @@ apt (0.7.26) UNRELEASED; urgency=low * doc/po/de.po: - correct a few typos in the german manpage translation. Thanks to Chris Leick and Georg Koppen! (Closes: #574962) + * apt-pkg/contrib/strutl.cc: + - convert all toupper calls to tolower_ascii for a little speedup [ Julian Andres Klode ] * cmdline/apt-mark: -- cgit v1.2.3