Skip to content
Permalink
Browse files

Update README and CONTRIBUTING file. [ci skip]

- README
  * clarify :: is emoji
  * Update benchmark template
  * note for benchmark-ips version
  * Link to "Less idiomatic but with significant performance ruby"
  * Link to fasterer
  * Add code license
- CONTRIBUTING
  * Add note for submitting an entry
  * Add note on how to run benchmark
  * Add license info
  • Loading branch information...
JuanitoFatas committed Mar 2, 2015
1 parent dac3dc8 commit db8ffb24f0b1d273b2d3d6a0fb5f9893fb9e1625
Showing with 68 additions and 8 deletions.
  1. +35 −1 CONTRIBUTING.md
  2. +33 −7 README.md
@@ -8,4 +8,38 @@ These idioms list here are trying to satisfiy following goals:

[![GOALS](/images/Goals.png)](https://speakerdeck.com/sferik/writing-fast-ruby?slide=11)

[JuanitoFatas](https://twitter.com/juanitofatas)
## Note on entry

Fast code first.

```ruby
require 'benchmark/ips'
def fast
end
def slow
end
Benchmark.ips do |x|
x.report('fast code description') { fast }
x.report('slow code description') { slow }
x.compare!
end
```

Run your result:

```
$ ruby -v code/your-new/entry.rb
```

Thanks in advance!!! Look forward to learning more from you!

<3 [JuanitoFatas](https://twitter.com/juanitofatas)

###### License

<small>The documentation is [CC BY-SA 4.0 (International)](https://github.com/JuanitoFatas/fast-ruby#license).</small>

<small>And code will be [CC0 1.0 Universal](https://github.com/JuanitoFatas/fast-ruby#code-license).</small>
@@ -1,4 +1,4 @@
**GitHub currently disable the rendering of emoji in large document, that's why you see these strange `::` stuff.**
**GitHub currently disable the rendering of emoji in large document, that's why you see these strange `::` stuff (they are emojis!).**

Fast Ruby :dash: :dash: :dash: :rocket: [![Build Status](https://travis-ci.org/JuanitoFatas/fast-ruby.svg?branch=travis)](https://travis-ci.org/JuanitoFatas/fast-ruby)
=======================================================================================================================================================================
@@ -16,22 +16,22 @@ All results listed in README.md :running: with Ruby 2.2.0p0 on OS X 10.10.1. Mac
Measurement Tool
-----------------

Use [benchmark-ips](https://github.com/evanphx/benchmark-ips).
Use [benchmark-ips](https://github.com/evanphx/benchmark-ips) (2.0+).

### Template

```ruby
require 'benchmark/ips'
def slow
def fast
end
def fast
def slow
end
Benchmark.ips do |x|
x.report('slow') { slow }
x.report('fast') { fast }
x.report('fast code description') { fast }
x.report('slow code description') { slow }
x.compare!
end
```
@@ -609,10 +609,17 @@ Comparison:
getter_and_setter: 1660021.9 i/s - 1.12x slower
```


## Less idiomatic but with significant performance ruby

Checkout: https://github.com/JuanitoFatas/fast-ruby/wiki/Less-idiomatic-but-with-significant-performance-diffrence


## Submit New Entry

Please! [Edit this README.md](https://github.com/JuanitoFatas/fast-ruby/edit/master/README.md) then [Submit a Awesome Pull Request](https://github.com/JuanitoFatas/fast-ruby/pulls)!


## Something went wrong

Code example is wrong? :cry: Got better example? :heart_eyes: Excellent!
@@ -637,13 +644,32 @@ Feel free to talk with me on Twitter! <3

- [Benchmarking Ruby](https://speakerdeck.com/davystevenson/benchmarking-ruby)

- [davy/benchmark-bigo](https://github.com/davy/benchmark-bigo) - Provides Big O notation benchmarking for Ruby
Talk by Davy Stevenson @ RubyConf 2014.

- [davy/benchmark-bigo](https://github.com/davy/benchmark-bigo)

Provides Big O notation benchmarking for Ruby.

- [The Ruby Challenge](https://therubychallenge.com/)

Talk by Prem Sichanugrist @ Ruby Kaigi 2014.

- [Fasterer](https://github.com/DamirSvrtan/fasterer)

Make your Rubies go faster with this command line tool.


## License

![CC-BY-SA](CC-BY-SA.png)

This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).


## Code License

### CC0 1.0 Universal

To the extent possible under law, @JuanitoFatas has waived all copyright and related or neighboring rights to "fast-ruby".

This work belongs to the community.

0 comments on commit db8ffb2

Please sign in to comment.
You can’t perform that action at this time.