From 11a217a481c87cc812a9deb0000d65ecce8e2ba2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 24 Nov 2009 04:14:34 -0500 Subject: Very minor but easy optimization for symbol_scope_t Lots of symbol_scope_t throwaway objects get created during value expression calculation, and 99% of them are never used. Therefore, the std::map which each contains is now within an optional<> wrapper, so that no constructor happens unless one is actually used. --- src/scope.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scope.h') diff --git a/src/scope.h b/src/scope.h index 44ca3229..93f80230 100644 --- a/src/scope.h +++ b/src/scope.h @@ -172,7 +172,7 @@ class symbol_scope_t : public child_scope_t { typedef std::map symbol_map; - symbol_map symbols; + optional symbols; public: explicit symbol_scope_t() { -- cgit v1.2.3