Skip to content

Commit 0255be5

Browse files
authored
Merge pull request #1 from atksh/dev
2 parents e764b91 + 69da903 commit 0255be5

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
path = pybind11
33
url = https://github.com/pybind/pybind11.git
44
branch = master
5+
[submodule "mimalloc"]
6+
path = mimalloc
7+
url = https://github.com/microsoft/mimalloc.git

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ endif()
2424

2525

2626
add_subdirectory(pybind11)
27+
add_subdirectory(mimalloc)
2728
pybind11_add_module(PRTree src/main.cc)
28-
target_link_libraries(PRTree PRIVATE OpenMP::OpenMP_CXX)
29+
target_link_libraries(PRTree PRIVATE OpenMP::OpenMP_CXX mimalloc-static)
2930

docs/experiment.ipynb

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

docs/images/fig1.png

-260 Bytes
Loading

docs/images/fig2.png

-608 Bytes
Loading

docs/images/fig3.png

-425 Bytes
Loading

mimalloc

Submodule mimalloc added at 07c6e60

src/prtree.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#pragma once
2+
#include <mimalloc.h>
23
#include <array>
34
#include <random>
45
#include <vector>
@@ -28,7 +29,7 @@ using std::swap;
2829
template<class T, class U>
2930
using pair = std::pair<T, U>;
3031
template<class T>
31-
using vec = std::vector<T>;
32+
using vec = std::vector<T, mi_stl_allocator<T>>;
3233
static std::mt19937 rand_src(42);
3334

3435

0 commit comments

Comments
 (0)