Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ sudoku:
splay:
desc: Splay tree operations (insert, find, remove) to stress GC.
single_file: true
string_malloc_pressure:
desc: Allocates and retains many empty Strings with large reserved capacity to exercise GC under malloc-backed String buffer pressure.
category: gc
single_file: true
default_harness: harness-gc
tinygql:
desc: TinyGQL gem parsing a large file in pure Ruby

Expand Down
12 changes: 12 additions & 0 deletions benchmarks/string_malloc_pressure.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require_relative '../harness/loader'

def build_string_malloc_pressure
live = []
500.times do
live << Array.new(200) { String.new(capacity: 64 * 1024) }
end
end

run_benchmark(10) do
build_string_malloc_pressure
end
Loading