aboutsummaryrefslogtreecommitdiffhomepage
path: root/intern.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-17 12:47:01 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-17 12:47:01 -0700
commitd06d6c69645c4d355772cb19043469328c05ccc5 (patch)
treeba9f91943b94b9b59b3e781580eca5d3230ac493 /intern.cpp
parent977a4477f646e344e66a7b0bc22e2e89b72d20db (diff)
Various changes to reduce fish's compiled code size
OS X release build executable size dropped from 672k to 511k
Diffstat (limited to 'intern.cpp')
-rw-r--r--intern.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/intern.cpp b/intern.cpp
index 224b9ca6..87480ea1 100644
--- a/intern.cpp
+++ b/intern.cpp
@@ -11,7 +11,6 @@
#include <wchar.h>
#include <unistd.h>
#include <set>
-#include <deque>
#include <algorithm>
#include "fallback.h"
@@ -29,14 +28,14 @@ class string_table_compare_t {
}
};
-/* A sorted deque ends up being a little more memory efficient than a std::set for the intern'd string table */
+/* A sorted vector ends up being a little more memory efficient than a std::set for the intern'd string table */
#define USE_SET 0
#if USE_SET
/** The table of intern'd strings */
typedef std::set<const wchar_t *, string_table_compare_t> string_table_t;
#else
/** The table of intern'd strings */
-typedef std::deque<const wchar_t *> string_table_t;
+typedef std::vector<const wchar_t *> string_table_t;
#endif
static string_table_t string_table;