-
-
Notifications
You must be signed in to change notification settings - Fork 83
Comparing changes
Open a pull request
base repository: rubocop/rubocop-performance
base: v1.24.0
head repository: rubocop/rubocop-performance
compare: v1.25.0
- 14 commits
- 25 files changed
- 3 contributors
Commits on Feb 15, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 73fecfd - Browse repository at this point
Copy the full SHA 73fecfdView commit details
Commits on Feb 18, 2025
-
Enable
InternalAffairs/CopEnabled
copSince #490 made RuboCop 1.72+ a runtime requirement, `cop_enabled?` can now be used.
Configuration menu - View commit details
-
Copy full SHA for 197472c - Browse repository at this point
Copy the full SHA 197472cView commit details
Commits on Feb 25, 2025
-
[Fix #482] Change
Performance/CollectionLiteralInLoop
to not regist……er offenses for `Array#include?` that are optimized directly in Ruby. Since `include?` on arrays are the only instances I ever run across this cop, I think it makes sense to add special handling for this. On Ruby 3.4 this does no array allocations: ``` require "memory_profiler" class Foo def bar Bar.new end end class Bar def baz end end foo = Foo.new report = MemoryProfiler.report do [1,2].include?(foo.bar.baz) end.pretty_print ``` Also, this code is simply slower on Ruby 3.4: ```rb require "benchmark/ips" local = [301, 302] val = 301 Benchmark.ips do |x| x.report('local') do local.include?(val) end x.report('literal') do [301, 302].include?(val) end x.compare! end ``` ``` $ ruby test.rb ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux] Warming up -------------------------------------- local 1.822M i/100ms literal 2.296M i/100ms Calculating ------------------------------------- local 18.235M (± 1.6%) i/s (54.84 ns/i) - 92.906M in 5.096277s literal 22.807M (± 1.5%) i/s (43.85 ns/i) - 114.789M in 5.034289s Comparison: literal: 22806932.0 i/s local: 18235340.7 i/s - 1.25x slower ```
Configuration menu - View commit details
-
Copy full SHA for d196b53 - Browse repository at this point
Copy the full SHA d196b53View commit details
Commits on Feb 26, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 5fa5f1a - Browse repository at this point
Copy the full SHA 5fa5f1aView commit details
Commits on Feb 27, 2025
-
Merge pull request #488 from Earlopain/collection-literal-ruby34
Change `Performance/CollectionLiteralInLoop` to not register offenses for `Array#include?` that are optimized directly in Ruby.
Configuration menu - View commit details
-
Copy full SHA for eb68f96 - Browse repository at this point
Copy the full SHA eb68f96View commit details
Commits on Mar 2, 2025
-
Automate the process of GitHub release creation
Follow-up to https://github.com/rubocop/rubocop/blob/master/.github/workflows/github_release.yml. This action will be triggered when a new tag is pushed and will auto-fill the release notes using the relevant file. The `rubocop-performance` repository has essentially the same structure as the `rubocop` repository, so it should work as is.
Configuration menu - View commit details
-
Copy full SHA for d842831 - Browse repository at this point
Copy the full SHA d842831View commit details
Commits on Mar 7, 2025
-
[Fix #492] Fix false positives for `Performance/StringIdentifierArgum…
…ent` This PR fixes false positives for `Performance/StringIdentifierArgument` when using interpolated string argument. Converting a string with interpolation into a symbol degrades performance. Fixes #492.
Configuration menu - View commit details
-
Copy full SHA for 8c368f6 - Browse repository at this point
Copy the full SHA 8c368f6View commit details
Commits on Mar 8, 2025
-
Merge pull request #493 from koic/fix_false_positives_for_performance…
…_string_identifier_argument [Fix #492] Fix false positives for `Performance/StringIdentifierArgument`
Configuration menu - View commit details
-
Copy full SHA for b6a39f4 - Browse repository at this point
Copy the full SHA b6a39f4View commit details
Commits on Mar 20, 2025
-
Configuration menu - View commit details
-
Copy full SHA for d339b99 - Browse repository at this point
Copy the full SHA d339b99View commit details -
Merge pull request #494 from dvandersluis/fixed-size-blocks
Fix `Performance/FixedSize` false positive when `count` is called with a `numblock`
Configuration menu - View commit details
-
Copy full SHA for 300b997 - Browse repository at this point
Copy the full SHA 300b997View commit details
Commits on Mar 27, 2025
-
Support
it
block parameter inPerformance
copsThis PR supports `it` block parameter in `Performance` cops.
Configuration menu - View commit details
-
Copy full SHA for cee374c - Browse repository at this point
Copy the full SHA cee374cView commit details
Commits on Mar 28, 2025
-
Merge pull request #496 from koic/support_itblock_in_performance_cops
Support `it` block parameter in `Performance` cops
Configuration menu - View commit details
-
Copy full SHA for 9e5a10a - Browse repository at this point
Copy the full SHA 9e5a10aView commit details
Commits on Apr 1, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 9bbcc52 - Browse repository at this point
Copy the full SHA 9bbcc52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a7fa7c - Browse repository at this point
Copy the full SHA 1a7fa7cView commit details
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.24.0...v1.25.0