Skip to content

Commit 0407151

Browse files
jding139jessding
authored andcommitted
rename shared ptr benchmarks correctly
1 parent 8a46a84 commit 0407151

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

benchmarks/binomial_heap/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ endif
1010
INCLUDES += -I$(BENCHMARK_PREFIX)/include
1111
LDFLAGS = -L$(BENCHMARK_PREFIX)/lib -lbenchmark -lbenchmark_main
1212

13-
SEMANTIC_PTR_BIN = run_benchmarks_semantic_ptr
14-
SEMANTIC_PTR_SRC = benchmark_semantic_ptr.cpp binomial_heap_semantic_ptr.cpp
13+
SHARED_PTR_BIN = run_benchmarks_shared_ptr
14+
SHARED_PTR_SRC = benchmark_shared_ptr.cpp binomial_heap_shared_ptr.cpp
1515

1616
REDESIGN_BIN = run_benchmarks_redesign
1717
REDESIGN_SRC = benchmark_redesign.cpp binomial_heap_redesign.cpp
@@ -20,18 +20,18 @@ COMPARE_PY = $(BENCHMARK_PREFIX)/share/googlebenchmark/tools/compare.py
2020

2121
.PHONY: all clean compare
2222

23-
all: $(SEMANTIC_PTR_BIN) $(REDESIGN_BIN)
23+
all: $(SHARED_PTR_BIN) $(REDESIGN_BIN)
2424

25-
$(SEMANTIC_PTR_BIN): $(SEMANTIC_PTR_SRC) binomial_heap_semantic_ptr.h
26-
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(SEMANTIC_PTR_SRC) $(LDFLAGS)
25+
$(SHARED_PTR_BIN): $(SHARED_PTR_SRC) binomial_heap_shared_ptr.h
26+
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(SHARED_PTR_SRC) $(LDFLAGS)
2727

2828
$(REDESIGN_BIN): $(REDESIGN_SRC) binomial_heap_redesign.h
2929
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(REDESIGN_SRC) $(LDFLAGS)
3030

31-
compare: $(SEMANTIC_PTR_BIN) $(REDESIGN_BIN)
32-
./$(SEMANTIC_PTR_BIN) --benchmark_out=semantic_ptr.json --benchmark_out_format=json
31+
compare: $(SHARED_PTR_BIN) $(REDESIGN_BIN)
32+
./$(SHARED_PTR_BIN) --benchmark_out=shared_ptr.json --benchmark_out_format=json
3333
./$(REDESIGN_BIN) --benchmark_out=redesign.json --benchmark_out_format=json
34-
python3 $(COMPARE_PY) benchmarks semantic_ptr.json redesign.json
34+
python3 $(COMPARE_PY) benchmarks shared_ptr.json redesign.json
3535

3636
clean:
37-
rm -f $(SEMANTIC_PTR_BIN) $(REDESIGN_BIN) *.o semantic_ptr.json redesign.json
37+
rm -f $(SHARED_PTR_BIN) $(REDESIGN_BIN) *.o shared_ptr.json redesign.json

benchmarks/binomial_heap/benchmark_semantic_ptr.cpp renamed to benchmarks/binomial_heap/benchmark_shared_ptr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <benchmark/benchmark.h>
22

3-
#include "binomial_heap_semantic_ptr.h"
3+
#include "binomial_heap_shared_ptr.h"
44

55
// ---------------------------------------------------------------------------
66
// Helpers
@@ -15,7 +15,7 @@ static BinomialHeap::priqueue build_heap(int n) {
1515
}
1616

1717
// ---------------------------------------------------------------------------
18-
// Benchmarks for BinomialHeap (semantic_ptr / baseline generated code)
18+
// Benchmarks for BinomialHeap (shared_ptr / baseline generated code)
1919
// ---------------------------------------------------------------------------
2020

2121
// Insert n elements one by one into an initially empty heap.

benchmarks/binomial_heap/binomial_heap_semantic_ptr.cpp renamed to benchmarks/binomial_heap/binomial_heap_shared_ptr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "binomial_heap_semantic_ptr.h"
1+
#include "binomial_heap_shared_ptr.h"
22

33
#include <functional>
44
#include <memory>
File renamed without changes.

0 commit comments

Comments
 (0)