diff options
author | Matt Valentine-House <matt@eightbitraptor.com> | 2023-01-10 21:13:18 +0000 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-01-13 10:31:35 -0500 |
commit | 2605615fe6c540740ce921c181c1bc081c019e49 (patch) | |
tree | f673fde2af97c916c4f27510a5bea57f653b7ddb /benchmark | |
parent | bb5fddd0709e17360eef343b986cd5a61ea2598c (diff) |
Benchmark String interpolation across size pools
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6965
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/string_concat.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark/string_concat.yml b/benchmark/string_concat.yml index e65c00cca9..da14692f5e 100644 --- a/benchmark/string_concat.yml +++ b/benchmark/string_concat.yml @@ -1,6 +1,8 @@ prelude: | CHUNK = "a" * 64 UCHUNK = "é" * 32 + SHORT = "a" * (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] / 2) + LONG = "a" * (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] * 2) GC.disable # GC causes a lot of variance benchmark: binary_concat_7bit: | @@ -43,3 +45,7 @@ benchmark: "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" + interpolation_same_size_pool: | + buffer = "#{SHORT}#{SHORT}" + interpolation_switching_size_pools: | + buffer = "#{SHORT}#{LONG}" |