Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

fasterer

> 编程语言
Open source

:zap: Don't make your Rubies go fast. Make them go fasterer ™. :zap:

1.8K stars0 likes1 views
WebsiteGitHub

About

:zap: Don't make your Rubies go fast. Make them go fasterer ™. :zap:

Fasterer

Make your Rubies go faster with this command line tool highly inspired by fast-ruby and Sferik's talk at Baruco Conf.

Fasterer will suggest some speed improvements which you can check in detail at the fast-ruby repo.

Please note that you shouldn't follow the suggestions blindly. Using a while loop instead of a each_with_index probably shouldn't be considered if you're doing a regular Rails project, but maybe if you're doing something very speed dependent such as Rack or if you're building your own framework, you might consider this speed increase.

Installation

bash
gem install fasterer

Usage

Run it from the root of your project:

bash
fasterer

Example output

app/models/post.rb:57 Array#select.first is slower than Array#detect.
app/models/post.rb:61 Array#select.first is slower than Array#detect.

db/seeds/cities.rb:15 Hash#keys.each is slower than Hash#each_key.
db/seeds/cities.rb:33 Hash#keys.each is slower than Hash#each_key.

test/options_test.rb:84 Hash#merge! with one argument is slower than Hash#[].

test/module_test.rb:272 Don't rescue NoMethodError, rather check with respond_to?.

spec/cache/mem_cache_store_spec.rb:161 Use tr instead of gsub when grepping plain strings.

Configuration

Configuration is done through the .fasterer.yml file. This can placed in the root of your project, or any ancestor folder.

Options:

  • Turn off speed suggestions
  • Blacklist files or complete folder paths

Example:

…

Integrations

These 3rd-party integrations enable you to run fasterer automatically as part of a larger framework.

  • https://github.com/jumanjihouse/pre-commit-hooks

    This integration allows to use fasterer as either a pre-commit hook or within CI. It uses the https://pre-commit.com/ framework for managing and maintaining multi-language pre-commit hooks.

  • https://github.com/prontolabs/pronto-fasterer

    Pronto runner for Fasterer, speed improvements suggester. Pronto also integrates via danger-pronto into the danger framework for pull requests on Github, Gitlab, and BitBucket.

  • https://github.com/vk26/action-fasterer

    Github-action for running fasterer via reviewdog. Reviewdog provides a way to post review comments in pull requests.

Speedups TODO:

  1. find vs bsearch
  2. Array#count vs Array#size
  3. Enumerable#each + push vs Enumerable#map
  4. Hash#merge vs Hash#merge!
  5. String#casecmp vs String#downcase + ==
  6. String concatenation
  7. String#match vs String#start_with?/String#end_with?
  8. String#gsub vs String#sub

Contributing

  1. Fork it ( https://github.com/DamirSvrtan/fasterer/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言