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
|
|
|
|
|
|
|
|
PROGS = stl_unordered_map abseil_flat abseil_parallel_flat
|
|
|
|
|
BUILD_PROGS = $(addprefix build/,$(PROGS))
|
|
|
|
|
SIZE = 100000000
|
|
|
|
|
|
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
|
|
|
|
|
$(CXX) -DSTL_UNORDERED bench.cc -o $@
|
|
|
|
|
|
|
|
|
|
build/abseil_flat: bench.cc Makefile
|
|
|
|
|
$(CXX) -DABSEIL_FLAT -I ../abseil-cpp bench.cc /MD -o $@ /link /LIBPATH:../abseil-cpp/build2/lib ${ABSEIL_LIBS}
|
|
|
|
|
|
|
|
|
|
build/abseil_parallel_flat: bench.cc Makefile
|
2019-03-09 13:04:05 -05:00
|
|
|
$(CXX) -DABSEIL_PARALLEL_FLAT -I ../abseil-cpp bench.cc /MD -o $@ /link /LIBPATH:../abseil-cpp/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
|
|
|
|
|
./build/stl_unordered_map $(SIZE) random > output
|
|
|
|
|
./build/abseil_flat $(SIZE) random >> output
|
|
|
|
|
./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
|
|
|
|
|
./build/abseil_flat $(SIZE) random >> output
|
|
|
|
|
./build/abseil_parallel_flat_4 $(SIZE) random >> output
|
|
|
|
|
./build/abseil_parallel_flat_5 $(SIZE) random >> output
|
|
|
|
|
./build/abseil_parallel_flat_6 $(SIZE) random >> output
|
|
|
|
|
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
|
2019-03-02 09:10:10 -05:00
|
|
|
|