README.md in faster_path-0.2.6 vs README.md in faster_path-0.3.1

- old
+ new

@@ -1,11 +1,11 @@ # FasterPath [![Gem Version](https://badge.fury.io/rb/faster_path.svg)](https://badge.fury.io/rb/faster_path) [![TravisCI Build Status](https://travis-ci.org/danielpclark/faster_path.svg?branch=master)](https://travis-ci.org/danielpclark/faster_path) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/10ul0gk3cwhlt2lj/branch/master?svg=true)](https://ci.appveyor.com/project/danielpclark/faster-path/branch/master) [![Latest Tag](https://img.shields.io/github/tag/danielpclark/faster_path.svg)](https://github.com/danielpclark/faster_path/tags) -[![Commits Since Last Release](https://img.shields.io/github/commits-since/danielpclark/faster_path/v0.2.6.svg)](https://github.com/danielpclark/faster_path/pulse) +[![Commits Since Last Release](https://img.shields.io/github/commits-since/danielpclark/faster_path/v0.3.1.svg)](https://github.com/danielpclark/faster_path/pulse) [![Binary Release](https://img.shields.io/github/release/danielpclark/faster_path.svg)](https://github.com/danielpclark/faster_path/releases) [![Coverage Status](https://coveralls.io/repos/github/danielpclark/faster_path/badge.svg)](https://coveralls.io/github/danielpclark/faster_path) [![Inline docs](http://inch-ci.org/github/danielpclark/faster_path.svg?branch=master)](http://inch-ci.org/github/danielpclark/faster_path) [![Code Triagers Badge](https://www.codetriage.com/danielpclark/faster_path/badges/users.svg)](https://www.codetriage.com/danielpclark/faster_path) [![Tweet This](https://raw.githubusercontent.com/danielpclark/faster_path/master/assets/tweet.png)](https://twitter.com/share?url=https%3A%2F%2Fgithub.com%2Fdanielpclark%2Ffaster_path&via=6ftdan&hashtags=Ruby&text=You%20could%20save%2015%25%20or%20more%20on%20website%20page%20load%20time%20by%20switching%20to%20the%20FasterPath%20gem.) @@ -53,11 +53,11 @@ 88 (1.2%) 21 (0.3%) Sprockets::Asset#dependency_fresh? 18 (0.3%) 18 (0.3%) ActionView::Helpers::AssetUrlHelper#compute_asset_extname 108 (1.5%) 14 (0.2%) ActionView::Helpers::AssetUrlHelper#asset_path ``` -Here are some addtional stats. From Rails loading to my home page, these methods are called _(not directly, Rails & gems call them)_ this many times. And the home page has minimal content. +Here are some additional stats. From Rails loading to my home page, these methods are called _(not directly, Rails & gems call them)_ this many times. And the home page has minimal content. ```ruby Pathname#to_s called 29172 times. Pathname#<=> called 24963 times. Pathname#chop_basename called 24456 times Pathname#initialize called 23103 times. @@ -95,12 +95,14 @@ |bootstrap-sass 3.3.4.1|bootstrap-sass 3.3.6| ## Status * Rust compilation is working -* Methods are _most likely_ stable -* Testers and developers are most welcome! +* Methods are stable +* Thoroughly tested +* Testers and developers are most welcome +* Windows & encoding support is underway! ## Installation Ensure Rust is installed: @@ -111,11 +113,11 @@ ``` Add this line to your application's Gemfile: ```ruby -gem 'faster_path', '~> 0.2.3' +gem 'faster_path', '~> 0.3.1' ``` And then execute: $ bundle @@ -145,10 +147,11 @@ | `FasterPath.cleanpath_aggressive` | `Pathname#cleanpath_aggressive` | 73.8% | | `FasterPath.cleanpath_conservative` | `Pathname#cleanpath_conservative` | 70.7% | | `FasterPath.del_trailing_separator` | `Pathname#del_trailing_separator` | 80.6% | | `FasterPath.directory?` | `Pathname#directory?` | 11.3% | | `FasterPath.entries` | `Pathname#entries` | 8.4% | +| `FasterPath.extname` | `File.extname` | 41.2% | | `FasterPath.has_trailing_separator?` | `Pathname#has_trailing_separator` | 67.6% | | `FasterPath.plus` | `Pathname#join` | 66.4% | | `FasterPath.plus` | `Pathname#plus` | 81.4% | | `FasterPath.relative?` | `Pathname#relative?` | 84.1% | | `FasterPath.relative_path_from` | `Pathname#relative_path_from` | 69.8% | @@ -179,14 +182,13 @@ |FasterPath Implementation|Ruby Implementation| |---|---| | `FasterPath.dirname` | `File.dirname` | | `FasterPath.basename` | `File.basename` | -| `FasterPath.extname` | `File.extname` | It's been my observation (and some others) that the Rust implementation of the C code for `File` has similar results but -performance seems to vary based on CPU cache on possibly 64bit/32bit system environmnets. When these methods were initially written, and somewhat simplistic, they were faster than the C implementations on `File`. After the implementations have been perfected to match the behavior in Ruby they don't perform as well and are therefore not included by default when the monkey patch method `FasterPath.sledgehammer_everything!` is executed. If you don't want to pass the `WITH_REGRESSION` environment variable you can put any turthy parameter on the monkey patch method to include it. +performance seems to vary based on CPU cache on possibly 64bit/32bit system environments. When these methods were initially written, and somewhat simplistic, they were faster than the C implementations on `File`. After the implementations have been perfected to match the behavior in Ruby they don't perform as well and are therefore not included by default when the monkey patch method `FasterPath.sledgehammer_everything!` is executed. ## Getting Started with Development The primary methods to target are mostly listed in the **Why** section above. You may find the Ruby source code useful for Pathname's [Ruby source](https://github.com/ruby/ruby/blob/32674b167bddc0d737c38f84722986b0f228b44b/ext/pathname/lib/pathname.rb), @@ -203,16 +205,10 @@ Learn and share performance tips on the [wiki](https://github.com/danielpclark/faster_path/wiki)! ### Building and running tests -First, bundle the gem's development dependencies by running `bundle`. - -Then, build the rust code: - -```sh -rake build_src -``` +First, bundle the gem's development dependencies by running `bundle`. Rust compilation is included in the current rake commands. FasterPath is tested with [The Ruby Spec Suite](https://github.com/ruby/spec) to ensure it is compatible with the native implementation, and also has its own test suite testing its monkey-patching and refinements functionality. To run all the tests at once, simply run `rake`.