Skip to content

Commit

Permalink
[oil-native] Turn on GC in osh_eval, by lowering GC threshold!
Browse files Browse the repository at this point in the history
Start with 100K objects, which seems reasonable from watching CPython's
configure run.

benchmarks/gc: Measure the cxx-opt binary, not cxx-gcverbose!

The max pause is ~141 ms, not 400+ ms.
  • Loading branch information
Andy C committed Dec 16, 2022
1 parent 2f1d38b commit fb3b504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmarks/gc.sh
Expand Up @@ -311,8 +311,8 @@ gc-run-oil() {
}

gc-run-big() {
local target=_bin/cxx-gcverbose/osh_eval
#local target=_bin/cxx-opt/osh_eval
#local target=_bin/cxx-gcverbose/osh_eval
local target=_bin/cxx-opt/osh_eval
ninja $target

local osh=$REPO_ROOT/$target
Expand Down
4 changes: 2 additions & 2 deletions build/ninja-rules-py.sh
Expand Up @@ -43,8 +43,8 @@ int main(int argc, char **argv) {
// complain_loudly_on_segfault();
// So big that we don't trigger collection
gHeap.Init(400 << 20);
// Arbitrary threshold of 100K objects based on CPython's configure
gHeap.Init(100000);
// NOTE(Jesse): Turn off buffered IO
setvbuf(stdout, 0, _IONBF, 0);
Expand Down

0 comments on commit fb3b504

Please sign in to comment.