2019-03-02 09:10:10 -05:00
|
|
|
CXX=CL -EHsc -DNDEBUG -Fo$@ -O2
|
2019-03-10 13:26:22 -04:00
|
|
|
#CXX=CL -EHsc -g -debug -Zi -Fo$@
|
2019-03-02 09:10:10 -05:00
|
|
|
#CXX=g++ -ggdb -O2 -lm -std=c++11 -DNDEBUG
|
|
|
|
|
|
2019-03-02 21:02:11 -05:00
|
|
|
ABSEIL_LIBS=absl_bad_optional_access.lib absl_bad_variant_access.lib absl_base.lib absl_demangle_internal.lib absl_hash.lib absl_int128.lib absl_internal_bad_any_cast_impl.lib absl_internal_city.lib absl_internal_civil_time.lib absl_internal_debugging_internal.lib absl_internal_graphcycles_internal.lib absl_internal_hashtablez_sampler.lib absl_internal_malloc_internal.lib absl_internal_spinlock_wait.lib absl_internal_strings_internal.lib absl_internal_throw_delegate.lib absl_internal_time_zone.lib absl_optional.lib absl_raw_hash_set.lib absl_stacktrace.lib absl_strings.lib absl_symbolize.lib absl_synchronization.lib absl_time.lib
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-04-05 21:00:01 -04:00
|
|
|
PROGS = stl_unordered_map sparsepp phmap abseil_flat abseil_parallel_flat phmap_flat
|
2019-03-02 09:10:10 -05:00
|
|
|
BUILD_PROGS = $(addprefix build/,$(PROGS))
|
|
|
|
|
SIZE = 100000000
|
2019-03-15 12:34:15 -04:00
|
|
|
ABSEIL = ../../abseil-cpp
|
2019-03-17 21:24:03 -04:00
|
|
|
PHMAP_SRC = ../parallel_hashmap
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-09 13:04:05 -05:00
|
|
|
all: test
|
2019-03-02 21:02:11 -05:00
|
|
|
|
|
|
|
|
builddir:
|
|
|
|
|
@if [ ! -d build ]; then mkdir build; fi
|
2019-03-02 09:10:10 -05:00
|
|
|
|
|
|
|
|
build/stl_unordered_map: bench.cc Makefile
|
2019-04-11 18:26:31 -04:00
|
|
|
$(CXX) -DSTL_UNORDERED -I.. bench.cc -o $@
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-15 12:34:15 -04:00
|
|
|
build/sparsepp: bench.cc Makefile
|
2019-04-11 18:26:31 -04:00
|
|
|
$(CXX) -DSPARSEPP -I.. -I../../sparsepp bench.cc -o $@
|
2019-03-15 12:34:15 -04:00
|
|
|
|
2019-03-17 21:24:03 -04:00
|
|
|
build/phmap: bench.cc Makefile $(PHMAP_SRC)/phmap.h
|
2019-04-07 18:12:32 -04:00
|
|
|
$(CXX) -DPHMAP -I.. -I$(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS}
|
2019-03-16 20:48:50 -04:00
|
|
|
|
2019-04-05 21:00:01 -04:00
|
|
|
build/phmap_flat: bench.cc Makefile $(PHMAP_SRC)/phmap.h
|
|
|
|
|
$(CXX) -DPHMAP_FLAT -I.. bench.cc /MD -o $@
|
|
|
|
|
|
2019-03-02 09:10:10 -05:00
|
|
|
build/abseil_flat: bench.cc Makefile
|
2019-04-11 18:26:31 -04:00
|
|
|
$(CXX) -DABSEIL_FLAT -I.. -I$(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS}
|
2019-03-02 09:10:10 -05:00
|
|
|
|
|
|
|
|
build/abseil_parallel_flat: bench.cc Makefile
|
2019-04-11 18:26:31 -04:00
|
|
|
$(CXX) -DABSEIL_PARALLEL_FLAT -I.. -I $(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS}
|
|
|
|
|
|
|
|
|
|
build/emplace: emplace.cc Makefile $(PHMAP_SRC)/phmap.h
|
|
|
|
|
$(CXX) -DABSEIL_FLAT -I.. -I$(ABSEIL) emplace.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS}
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-09 13:04:05 -05:00
|
|
|
progs: $(BUILD_PROGS)
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-09 13:04:05 -05:00
|
|
|
test: builddir progs
|
2019-03-02 09:10:10 -05:00
|
|
|
-rm -f output
|
2019-03-15 12:34:15 -04:00
|
|
|
#./build/stl_unordered_map $(SIZE) random >> output
|
2019-04-05 21:00:01 -04:00
|
|
|
#./build/sparsepp $(SIZE) random >> output
|
2019-04-07 18:12:32 -04:00
|
|
|
./build/abseil_flat $(SIZE) random >> output
|
2019-04-05 21:00:01 -04:00
|
|
|
#./build/phmap_flat $(SIZE) random >> output
|
2019-03-17 21:24:03 -04:00
|
|
|
./build/phmap $(SIZE) random >> output
|
2019-03-02 09:10:10 -05:00
|
|
|
./build/abseil_parallel_flat $(SIZE) random >> output
|
2019-03-02 21:02:11 -05:00
|
|
|
python make_chart_data.py < output
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-09 15:42:57 -05:00
|
|
|
test_cust:
|
|
|
|
|
-rm -f output
|
2019-03-15 16:53:37 -04:00
|
|
|
#./build/abseil_flat $(SIZE) random >> output
|
|
|
|
|
#./build/sparsepp $(SIZE) random >> output
|
|
|
|
|
./build/abseil_parallel_flat_5 $(SIZE) random >> output
|
|
|
|
|
./build/abseil_parallel_flat $(SIZE) random >> output
|
2019-03-09 15:42:57 -05:00
|
|
|
python make_chart_data.py < output
|
|
|
|
|
|
2019-03-02 21:02:11 -05:00
|
|
|
chart:
|
|
|
|
|
python make_chart_data.py < output
|
2019-03-02 09:10:10 -05:00
|
|
|
|
2019-03-02 21:02:11 -05:00
|
|
|
clean:
|
|
|
|
|
-rm -fr output build
|