| 1 |
CXX=CL -EHsc -DNDEBUG -Fo$@ -O2 |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
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 |
| 6 |
|
| 7 |
PROGS = stl_unordered_map sparsepp phmap abseil_flat abseil_parallel_flat phmap_flat |
| 8 |
BUILD_PROGS = $(addprefix build/,$(PROGS)) |
| 9 |
SIZE = 100000000 |
| 10 |
ABSEIL = ../../abseil-cpp |
| 11 |
PHMAP_SRC = ../parallel_hashmap |
| 12 |
|
| 13 |
all: test |
| 14 |
|
| 15 |
builddir: |
| 16 |
@if [ ! -d build ]; then mkdir build; fi |
| 17 |
|
| 18 |
build/stl_unordered_map: bench.cc Makefile |
| 19 |
$(CXX) -DSTL_UNORDERED -I.. bench.cc -o $@ |
| 20 |
|
| 21 |
build/sparsepp: bench.cc Makefile |
| 22 |
$(CXX) -DSPARSEPP -I.. -I../../sparsepp bench.cc -o $@ |
| 23 |
|
| 24 |
build/phmap: bench.cc Makefile $(PHMAP_SRC)/phmap.h |
| 25 |
$(CXX) -DPHMAP -I.. -I$(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS} |
| 26 |
|
| 27 |
build/phmap_flat: bench.cc Makefile $(PHMAP_SRC)/phmap.h |
| 28 |
$(CXX) -DPHMAP_FLAT -I.. bench.cc /MD -o $@ |
| 29 |
|
| 30 |
build/abseil_flat: bench.cc Makefile |
| 31 |
$(CXX) -DABSEIL_FLAT -I.. -I$(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS} |
| 32 |
|
| 33 |
build/abseil_parallel_flat: bench.cc Makefile |
| 34 |
$(CXX) -DABSEIL_PARALLEL_FLAT -I.. -I $(ABSEIL) bench.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS} |
| 35 |
|
| 36 |
build/emplace: emplace.cc Makefile $(PHMAP_SRC)/phmap.h |
| 37 |
$(CXX) -DABSEIL_FLAT -I.. -I$(ABSEIL) emplace.cc /MD -o $@ /link /LIBPATH:$(ABSEIL)/build/lib ${ABSEIL_LIBS} |
| 38 |
|
| 39 |
progs: $(BUILD_PROGS) |
| 40 |
|
| 41 |
test: builddir progs |
| 42 |
-rm -f output |
| 43 |
#./build/stl_unordered_map $(SIZE) random >> output |
| 44 |
#./build/sparsepp $(SIZE) random >> output |
| 45 |
./build/abseil_flat $(SIZE) random >> output |
| 46 |
#./build/phmap_flat $(SIZE) random >> output |
| 47 |
./build/phmap $(SIZE) random >> output |
| 48 |
./build/abseil_parallel_flat $(SIZE) random >> output |
| 49 |
python make_chart_data.py < output |
| 50 |
|
| 51 |
test_cust: |
| 52 |
-rm -f output |
| 53 |
#./build/abseil_flat $(SIZE) random >> output |
| 54 |
#./build/sparsepp $(SIZE) random >> output |
| 55 |
./build/abseil_parallel_flat_5 $(SIZE) random >> output |
| 56 |
./build/abseil_parallel_flat $(SIZE) random >> output |
| 57 |
python make_chart_data.py < output |
| 58 |
|
| 59 |
chart: |
| 60 |
python make_chart_data.py < output |
| 61 |
|
| 62 |
clean: |
| 63 |
-rm -fr output build |