Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simply replaces
malloc
allocation withmmap
.Performance reports after:
MacOS
MIPS diff:
Bench_cnots: +1.24%
Bench_count: +1.5%
Bench_sum_range: +1.28%
Enum_bin: +0.9%
Fuse_inc: +13.6%
Enum_lam_smart: +1.23%
X86
MIPs diff
Performances on x86 did not improve / inconclusive, e.g from -1% to +1% on the runs.
X86
MacOs individual reports
bench_cnots
malloc:
WORK: 117440614 interactions
TIME: 0.9676010 seconds
SIZE: 335544641 nodes
PERF: 121.373 MIPS
mmap:
WORK: 117440614 interactions
TIME: 0.9557490 seconds
SIZE: 335544641 nodes
PERF: 122.878 MIPS
bench count:
malloc:
WORK: 12000000004 interactions
TIME: 1.0456890 seconds
SIZE: 3 nodes
PERF: 11475.687 MIPS
mmap:
WORK: 12000000004 interactions
TIME: 1.0303480 seconds
SIZE: 3 nodes
PERF: 11646.550 MIPS
bench sum range:
malloc:
WORK: 600000007 interactions
TIME: 0.1483380 seconds
SIZE: 100000005 nodes
PERF: 4044.817 MIPS
mmap:
WORK: 600000007 interactions
TIME: 0.1464510 seconds
SIZE: 100000005 nodes
PERF: 4096.933 MIPS
enum bin:
malloc:
WORK: 390749326 interactions
TIME: 3.1301000 seconds
SIZE: 1742192467 nodes
PERF: 124.836 MIPS
mmap:
WORK: 390749326 interactions
TIME: 3.1006360 seconds
SIZE: 1742192467 nodes
PERF: 126.022 MIPS
fuse inc
maloc:
WORK: 11472 interactions
TIME: 0.0002010 seconds
SIZE: 37339 nodes
PERF: 57.075 MIPS
mmap:
WORK: 11472 interactions
TIME: 0.0001770 seconds
SIZE: 37339 nodes
PERF: 64.814 MIPS
enum lam smart:
malloc
WORK: 189534 interactions
TIME: 0.0055890 seconds
SIZE: 839736 nodes
PERF: 33.912 MIPS
mmap:
WORK: 189534 interactions
TIME: 0.0055210 seconds
SIZE: 839736 nodes
PERF: 34.330 MIPS
X86 individual reports (on 16 allocation on runtime)
bench count:
malloc:
! a = 4000
a
WORK: 12004 interactions
TIME: 0.0000747 seconds
SIZE: 3 nodes
PERF: 160.591 MIPS
mmap:
! a = 4000
a
WORK: 12004 interactions
TIME: 0.0000747 seconds
SIZE: 3 nodes
PERF: 160.705 MIPS
bench sum range
malloc:
! a = 12497500
a
WORK: 60007 interactions
TIME: 0.0002372 seconds
SIZE: 10005 nodes
PERF: 252.992 MIPS
mmap:
! a = 12497500
a
WORK: 60007 interactions
TIME: 0.0002528 seconds
SIZE: 10005 nodes
PERF: 237.388 MIPS
enum bin
(4 bit enum)
WORK: 1918 interactions
TIME: 0.0001612 seconds
SIZE: 8043 nodes
PERF: 11.901 MIPS
! a = &2{* &1{* &1{&2{* } &2{ λb ((b 3) 3)}}}}
a
WORK: 1918 interactions
TIME: 0.0001714 seconds
SIZE: 8043 nodes
PERF: 11.192 MIPS
enum lam smart
(with nested lambdas depth=3)
malloc:
WORK: 12236 interactions
TIME: 0.0008063 seconds
SIZE: 60357 nodes
PERF: 15.176 MIPS
mmap:
WORK: 12236 interactions
TIME: 0.0007667 seconds
SIZE: 60357 nodes
PERF: 15.958 MIPS
fuse inc
malloc:
! a = 1234567
a
WORK: 11472 interactions
TIME: 0.0005718 seconds
SIZE: 37339 nodes
PERF: 20.062 MIPS
mmap:
WORK: 11472 interactions
TIME: 0.0005820 seconds
SIZE: 37339 nodes
PERF: 19.713 MIPS