Sorted ExifFormatTable[] in approximate decreasing order of
authorDan Fandrich <dan@coneharvesters.com>
Sun, 8 Nov 2009 06:59:07 +0000 (22:59 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 8 Nov 2009 06:59:07 +0000 (22:59 -0800)
popularity to decrease the total average lookup time.

ChangeLog
libexif/exif-format.c

index d276abe..93ddfe3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-07  Dan Fandrich <dan@coneharvesters.com>
+
+       * Sorted ExifFormatTable[] in approximate decreasing order of
+         popularity to decrease the total average lookup time.
+
 2009-11-05  Dan Fandrich <dan@coneharvesters.com>
 
        * Added a bunch of new translations from launchpad.net
index f5727af..2c63c33 100644 (file)
 
 #include <stdlib.h>
 
+/*! Table of data format types, descriptions and sizes.
+ * This table should be sorted in decreasing order of popularity in order
+ * to decrease the total average lookup time.
+ */
 static const struct {
         ExifFormat format;
        const char *name;
         unsigned char size;
 } ExifFormatTable[] = {
-        {EXIF_FORMAT_BYTE,      N_("Byte"),      1},
-        {EXIF_FORMAT_ASCII,     N_("ASCII"),     1},
         {EXIF_FORMAT_SHORT,     N_("Short"),     2},
-        {EXIF_FORMAT_LONG,      N_("Long"),      4},
         {EXIF_FORMAT_RATIONAL,  N_("Rational"),  8},
+        {EXIF_FORMAT_SRATIONAL, N_("SRational"), 8},
+        {EXIF_FORMAT_UNDEFINED, N_("Undefined"), 1},
+        {EXIF_FORMAT_ASCII,     N_("ASCII"),     1},
+        {EXIF_FORMAT_LONG,      N_("Long"),      4},
+        {EXIF_FORMAT_BYTE,      N_("Byte"),      1},
        {EXIF_FORMAT_SBYTE,     N_("SByte"),     1},
        {EXIF_FORMAT_SSHORT,    N_("SShort"),    2},
         {EXIF_FORMAT_SLONG,     N_("SLong"),     4},
-        {EXIF_FORMAT_SRATIONAL, N_("SRational"), 8},
        {EXIF_FORMAT_FLOAT,     N_("Float"),     4},
        {EXIF_FORMAT_DOUBLE,    N_("Double"),    8},
-        {EXIF_FORMAT_UNDEFINED, N_("Undefined"), 1},
         {0, NULL, 0}
 };