{"id":20019685,"url":"https://github.com/kddnewton/fast_underscore","last_synced_at":"2025-08-21T02:31:43.322Z","repository":{"id":37850221,"uuid":"114483773","full_name":"kddnewton/fast_underscore","owner":"kddnewton","description":"Fast String#underscore implementation","archived":false,"fork":false,"pushed_at":"2024-06-04T19:27:53.000Z","size":560,"stargazers_count":32,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-15T00:15:17.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kddnewton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-16T19:02:29.000Z","updated_at":"2024-06-15T00:15:21.758Z","dependencies_parsed_at":"2023-02-14T00:45:15.808Z","dependency_job_id":"82302746-2473-4844-b83a-c7e454a68adf","html_url":"https://github.com/kddnewton/fast_underscore","commit_stats":{"total_commits":297,"total_committers":8,"mean_commits":37.125,"dds":0.4444444444444444,"last_synced_commit":"a4234187ba25f216ceb8d2294958154b08913a0e"},"previous_names":["kddeisz/fast_underscore"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kddnewton%2Ffast_underscore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kddnewton%2Ffast_underscore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kddnewton%2Ffast_underscore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kddnewton%2Ffast_underscore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kddnewton","download_url":"https://codeload.github.com/kddnewton/fast_underscore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230479865,"owners_count":18232630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:28:26.858Z","updated_at":"2024-12-19T18:17:30.947Z","avatar_url":"https://github.com/kddnewton.png","language":"C","readme":"# `String#underscore` Ruby Extension\n\n[![Build Status](https://github.com/kddnewton/fast_underscore/workflows/Main/badge.svg)](https://github.com/kddnewton/fast_underscore/actions)\n[![Gem Version](https://img.shields.io/gem/v/fast_underscore.svg)](https://rubygems.org/gems/fast_underscore)\n\n`fast_underscore` is a C extension that provides a fast implementation of [ActiveSupport's `String#underscore` method](http://api.rubyonrails.org/classes/String.html#method-i-underscore).\n\n## Is it fast?\n\nAt last check, these were the benchmarks (obtained by running `bin/bench` with Rails 6.0.2):\n\n```\nWarming up --------------------------------------\n       ActiveSupport     5.000  i/100ms\n      FastUnderscore    70.000  i/100ms\nCalculating -------------------------------------\n       ActiveSupport     50.564  (± 9.9%) i/s -    250.000  in   5.012563s\n      FastUnderscore    707.691  (± 1.3%) i/s -      3.570k in   5.045375s\n\nComparison:\n      FastUnderscore:      707.7 i/s\n       ActiveSupport:       50.6 i/s - 14.00x  slower\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"fast_underscore\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install fast_underscore\n\n### Usage with Rails\n\n`ActiveSupport::Inflector#underscore`, in addition to underscoring the input will additionally take into account known acronyms. Since this can't be done at compile time, `FastUnderscore` will detect when `ActiveSupport` is loaded and take advantage of its knowledge of acronyms while still using the native extension.\n\nSince the `#underscore` method is used so much throughout the Rails boot process (for autoloading dependencies, determining table names, determining inverse associations, etc.), it's best to hook into Rails as early as possible. As such, for the best results in your `Gemfile` add `require: false` to the `gem 'fast_underscore'` declaration and add `require 'fast_underscore'` to the bottom of `config/boot.rb`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/kddnewton/fast_underscore.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkddnewton%2Ffast_underscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkddnewton%2Ffast_underscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkddnewton%2Ffast_underscore/lists"}