Have jsonfindptrs use C++17's std::variant

On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:

$ time gen/bin/example-jsonfindptrs < citylots.json > /dev/null
Before this commit:
real    0m7.333s
After:
real    0m5.970s
Ratio: 1.23x

Using "/usr/bin/time -v" instead of "time"
Before this commit:
Maximum resident set size (kbytes): 2556992
After:
Maximum resident set size (kbytes): 1214812
Ratio: 2.10x
This commit is contained in:
Nigel Tao committed 2020-08-29 22:23:15 +10:00
1 parent 9d69939f2c
commit 5396dbd17d
2 files changed
+96 -124

No files matched your search

+4 -2
View File
@@ -55,9 +55,11 @@ for f in $sources; do
fi
elif [ -e example/$f/*.c ]; then
echo "Building gen/bin/example-$f"
$CC -O3 example/$f/*.c -o gen/bin/example-$f
$CC -O3 example/$f/*.c -o gen/bin/example-$f
elif [ $f = "jsonfindptrs" ]; then
$CXX -O3 -std=c++17 example/$f/*.cc -o gen/bin/example-$f
elif [ -e example/$f/*.cc ]; then
echo "Building gen/bin/example-$f"
$CXX -O3 example/$f/*.cc -o gen/bin/example-$f
$CXX -O3 example/$f/*.cc -o gen/bin/example-$f
fi
done