summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2020-01-04 00:45:58 +0000
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-01-11 14:40:36 +1300
commit40c57ad4a13898760b81a99dac181e5bf61afe47 (patch)
tree346d0d3976425a6211bfc8e1e5ece4a0411de730 /benchmark
parentb53d8230f1fed0f99a8a852d853bbd9b5c353fed (diff)
Let execution context local storage be an ID table
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2814
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/fiber_locals.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/benchmark/fiber_locals.yml b/benchmark/fiber_locals.yml
new file mode 100644
index 0000000000..8588686477
--- /dev/null
+++ b/benchmark/fiber_locals.yml
@@ -0,0 +1,8 @@
+prelude: |
+ th = Thread.current
+ th[:key] = :val
+benchmark:
+ key?: th.key?(:key)
+ []: th[:key]
+ keys: th.keys
+loop_count: 1_000_000