Skip to content

Conversation

@no-reply
Copy link

@no-reply no-reply commented Jul 1, 2016

This is a follow-up to #189. The Ruby core issue that gave rise to that ticket has been patched since last August. It's probably still worth discussing whether any releases missing the patches should be supported.

In addition to reverting the original patch for #189., this aims to remove unneeded &block parameters throughout.

My benchmark results on bench/hash/each_bench.rb are too variable to say anything too conclusive. Still, I modified the file with b.warmup = 10; b.time = 60, and here are my results. They, at least, point to this making a measurable difference:

On branch use-yield

Warming up --------------------------------------
          each small    44.652k i/100ms
         each medium   113.000  i/100ms
          each large     1.000  i/100ms
Calculating -------------------------------------
          each small    693.754k (± 4.2%) i/s -     41.482M
         each medium      1.095k (± 3.7%) i/s -     65.653k
          each large      1.211  (± 0.0%) i/s -     73.000 

Warming up --------------------------------------
          each small    75.119k i/100ms
         each medium   115.000  i/100ms
          each large     1.000  i/100ms
Calculating -------------------------------------
          each small      1.906M (± 6.4%) i/s -    113.505M
         each medium      1.106k (± 5.6%) i/s -     66.125k
          each large      1.247  (± 0.0%) i/s -     75.000 
Switched to branch 'core'

Warming up --------------------------------------
          each small    44.839k i/100ms
         each medium   120.000  i/100ms
          each large     1.000  i/100ms
Calculating -------------------------------------
          each small    972.978k (± 7.1%) i/s -     57.887M
         each medium      1.255k (± 5.7%) i/s -     75.000k
          each large      1.728  (± 0.0%) i/s -    104.000 

Warming up --------------------------------------
          each small    37.133k i/100ms
         each medium   120.000  i/100ms
          each large     1.000  i/100ms
Calculating -------------------------------------
          each small    579.215k (± 9.8%) i/s -     34.274M
         each medium      1.208k (± 6.0%) i/s -     72.120k
          each large      1.651  (± 0.0%) i/s -     99.000

Reverts the change motivated by https://bugs.ruby-lang.org/issues/11451,
see also hamstergem#189.

The underlying issue was fixed in r52717, which is in Ruby
2.2.5. This requires some discussion about whether support for earlier
Ruby 2.2.x releases can be dropped at this stage.
@no-reply
Copy link
Author

no-reply commented Jul 3, 2016

This is failing on Rubinius 3.29 in CI. I can't repeat the failure with 3.30 At a glance, this looks like a bug in 3.29.

I can't install 3.29 locally due to LLVM incompatibilities; but might be able to look into it another time. We should evaluate this more thoroughly before moving forward.

@alexdowad
Copy link
Contributor

Personally, I don't care if tests fail on Rubinius. Rubinius is a buggy heap of... bugs.

@alexdowad
Copy link
Contributor

Sorry, what was the motivation for the removal of all occurrences of &block?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants