From 26d92017d3b36cff940dcb7d1611c42232edb81a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 29 Aug 2016 17:28:20 +0200 Subject: Add builtin function "partition" The implementation of "partition" in Nixpkgs is O(n^2) (because of the use of ++), and for some reason was causing stack overflows in multi-threaded evaluation (not sure why). This reduces "nix-env -qa --drv-path" runtime by 0.197s and memory usage by 298 MiB (in non-Boehm mode). --- src/libexpr/json-to-value.cc | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/libexpr/json-to-value.cc') diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc index 1daf84600..f671802bc 100644 --- a/src/libexpr/json-to-value.cc +++ b/src/libexpr/json-to-value.cc @@ -12,15 +12,6 @@ static void skipWhitespace(const char * & s) } -#if HAVE_BOEHMGC -typedef std::vector > ValueVector; -typedef std::map, gc_allocator > ValueMap; -#else -typedef std::vector ValueVector; -typedef std::map ValueMap; -#endif - - static string parseJSONString(const char * & s) { string res; -- cgit v1.2.3