-
-
Notifications
You must be signed in to change notification settings - Fork 79
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: rubocop/rubocop-performance
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.22.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: rubocop/rubocop-performance
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 7 commits
- 8 files changed
- 1 contributor
Commits on Sep 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f74a890 - Browse repository at this point
Copy the full SHA f74a890View commit details
Commits on Sep 17, 2024
-
[Fix #468] Fix false positives for `Performance/BigDecimalWithNumeric…
…Argument` Fixes #468. This PR fixes false positives for `Performance/BigDecimalWithNumericArgument` when using float argument for `BigDecimal`. In Ruby 3.1 and later, cases where numbers are faster than strings are limited to `Integer`. For `Float`, strings are still faster: ```console $ cat example.rb require 'benchmark/ips' require 'bigdecimal' require 'bigdecimal/util' Benchmark.ips do |x| x.report('float string') { BigDecimal('4.2') } x.report('float with prec') { BigDecimal(4.2, Float::DIG + 1) } x.report('to_d string without prec') { '4.2'.to_d } x.report('to_d float without prec') { 4.2.to_d } x.report('to_d float with prec') { 4.2.to_d(Float::DIG + 1) } x.compare! end ``` ```console ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] Warming up -------------------------------------- float string 246.214k i/100ms float with prec 173.880k i/100ms to_d string without prec 255.950k i/100ms to_d float without prec 181.033k i/100ms to_d float with prec 151.091k i/100ms Calculating ------------------------------------- float string 2.418M (± 5.5%) i/s - 12.064M in 5.004969s float with prec 1.685M (± 4.0%) i/s - 8.520M in 5.064059s to_d string without prec 2.460M (± 4.2%) i/s - 12.286M in 5.002392s to_d float without prec 1.781M (± 6.5%) i/s - 8.871M in 5.007829s to_d float with prec 1.584M (± 5.7%) i/s - 8.008M in 5.072184s Comparison: to_d string without prec: 2460462.7 i/s float string: 2418003.6 i/s - same-ish: difference falls within error to_d float without prec: 1781070.6 i/s - 1.38x slower float with prec: 1685372.9 i/s - 1.46x slower to_d float with prec: 1584419.5 i/s - 1.55x slower ```
Configuration menu - View commit details
-
Copy full SHA for 6bb06b2 - Browse repository at this point
Copy the full SHA 6bb06b2View commit details -
Merge pull request #469 from koic/fix_false_positives_for_performance…
…_big_decimal_with_numeric_argument_cop [Fix #468] Fix false positives for `Performance/BigDecimalWithNumericArgument`
Configuration menu - View commit details
-
Copy full SHA for 100cdfe - Browse repository at this point
Copy the full SHA 100cdfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3188974 - Browse repository at this point
Copy the full SHA 3188974View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69c5abc - Browse repository at this point
Copy the full SHA 69c5abcView commit details -
Configuration menu - View commit details
-
Copy full SHA for c75628f - Browse repository at this point
Copy the full SHA c75628fView commit details
Commits on Oct 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fb0a21b - Browse repository at this point
Copy the full SHA fb0a21bView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.22.0...master