Skip to content

Commit

Permalink
🔀 merge branch 'feature/nonius_benchmarks' into TurpentineDistillery-…
Browse files Browse the repository at this point in the history
…feature/locale_independent_num_to_str
  • Loading branch information
nlohmann committed Jan 4, 2017
1 parent 6f63e6b commit 6243bf5
Show file tree
Hide file tree
Showing 14 changed files with 4,543 additions and 1,845 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -13,13 +13,15 @@ doc/xml
doc/html
me.nlohmann.json.docset

benchmarks/files/numbers/*.json
benchmarks/data/numbers/*.json

.idea
cmake-build-debug


test/test-*

benchmarks/benchmarks
.svn

test/thirdparty/Fuzzer/libFuzzer.a
Expand Down
15 changes: 2 additions & 13 deletions Makefile
Expand Up @@ -11,7 +11,7 @@ all:
# clean up
clean:
rm -fr json_unit json_benchmarks fuzz fuzz-testing *.dSYM test/*.dSYM
rm -fr benchmarks/files/numbers/*.json
rm -fr benchmarks/files/numbers/*.json benchmarks/benchmarks_*
$(MAKE) clean -Cdoc
$(MAKE) clean -Ctest

Expand Down Expand Up @@ -113,18 +113,7 @@ pretty:
--align-reference=type --add-brackets --convert-tabs --close-templates \
--lineend=linux --preserve-date --suffix=none --formatted \
src/json.hpp src/json.hpp.re2c test/src/*.cpp \
benchmarks/benchmarks.cpp doc/examples/*.cpp


##########################################################################
# benchmarks
##########################################################################

# benchmarks
json_benchmarks: benchmarks/benchmarks.cpp benchmarks/benchpress.hpp benchmarks/cxxopts.hpp src/json.hpp
cd benchmarks/files/numbers ; python generate.py
$(CXX) -std=c++11 -pthread $(CXXFLAGS) -DNDEBUG -O3 -flto -I src -I benchmarks $< $(LDFLAGS) -o $@
./json_benchmarks
benchmarks/src/*.cpp doc/examples/*.cpp


##########################################################################
Expand Down
17 changes: 17 additions & 0 deletions benchmarks/Makefile
@@ -0,0 +1,17 @@
# benchmarks
all: benchmarks_dump_json benchmarks_dump_cbor benchmarks_dump_msgpack benchmarks_parse_json

benchmarks_dump_json: src/benchmarks.cpp
$(CXX) -std=c++11 $(CXXFLAGS) -DNDEBUG -DJSON_BENCHMARK_DUMP_JSON -O3 -flto -I ../src -I src -I thirdparty $< $(LDFLAGS) -o $@

benchmarks_dump_cbor: src/benchmarks.cpp
$(CXX) -std=c++11 $(CXXFLAGS) -DNDEBUG -DJSON_BENCHMARK_DUMP_CBOR -O3 -flto -I ../src -I src -I thirdparty $< $(LDFLAGS) -o $@

benchmarks_dump_msgpack: src/benchmarks.cpp
$(CXX) -std=c++11 $(CXXFLAGS) -DNDEBUG -DJSON_BENCHMARK_DUMP_MSGPACK -O3 -flto -I ../src -I src -I thirdparty $< $(LDFLAGS) -o $@

benchmarks_parse_json: src/benchmarks.cpp
$(CXX) -std=c++11 $(CXXFLAGS) -DNDEBUG -DJSON_BENCHMARK_PARSE_JSON -O3 -flto -I ../src -I src -I thirdparty $< $(LDFLAGS) -o $@

prepare:
cd data/numbers ; python generate.py
118 changes: 0 additions & 118 deletions benchmarks/benchmarks.cpp

This file was deleted.

0 comments on commit 6243bf5

Please sign in to comment.