Skip to content

Commit db8ffb2

Browse files
committed
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
1 parent dac3dc8 commit db8ffb2

File tree

2 files changed

+68
-8
lines changed

2 files changed

+68
-8
lines changed

CONTRIBUTING.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,38 @@ These idioms list here are trying to satisfiy following goals:
88

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

11-
[JuanitoFatas](https://twitter.com/juanitofatas)
11+
## Note on entry
12+
13+
Fast code first.
14+
15+
```ruby
16+
require 'benchmark/ips'
17+
18+
def fast
19+
end
20+
21+
def slow
22+
end
23+
24+
Benchmark.ips do |x|
25+
x.report('fast code description') { fast }
26+
x.report('slow code description') { slow }
27+
x.compare!
28+
end
29+
```
30+
31+
Run your result:
32+
33+
```
34+
$ ruby -v code/your-new/entry.rb
35+
```
36+
37+
Thanks in advance!!! Look forward to learning more from you!
38+
39+
<3 [JuanitoFatas](https://twitter.com/juanitofatas)
40+
41+
###### License
42+
43+
<small>The documentation is [CC BY-SA 4.0 (International)](https://github.com/JuanitoFatas/fast-ruby#license).</small>
44+
45+
<small>And code will be [CC0 1.0 Universal](https://github.com/JuanitoFatas/fast-ruby#code-license).</small>

README.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**GitHub currently disable the rendering of emoji in large document, that's why you see these strange `::` stuff.**
1+
**GitHub currently disable the rendering of emoji in large document, that's why you see these strange `::` stuff (they are emojis!).**
22

33
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)
44
=======================================================================================================================================================================
@@ -16,22 +16,22 @@ All results listed in README.md :running: with Ruby 2.2.0p0 on OS X 10.10.1. Mac
1616
Measurement Tool
1717
-----------------
1818

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

2121
### Template
2222

2323
```ruby
2424
require 'benchmark/ips'
2525

26-
def slow
26+
def fast
2727
end
2828

29-
def fast
29+
def slow
3030
end
3131

3232
Benchmark.ips do |x|
33-
x.report('slow') { slow }
34-
x.report('fast') { fast }
33+
x.report('fast code description') { fast }
34+
x.report('slow code description') { slow }
3535
x.compare!
3636
end
3737
```
@@ -609,10 +609,17 @@ Comparison:
609609
getter_and_setter: 1660021.9 i/s - 1.12x slower
610610
```
611611

612+
613+
## Less idiomatic but with significant performance ruby
614+
615+
Checkout: https://github.com/JuanitoFatas/fast-ruby/wiki/Less-idiomatic-but-with-significant-performance-diffrence
616+
617+
612618
## Submit New Entry
613619

614620
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)!
615621

622+
616623
## Something went wrong
617624

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

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

640-
- [davy/benchmark-bigo](https://github.com/davy/benchmark-bigo) - Provides Big O notation benchmarking for Ruby
647+
Talk by Davy Stevenson @ RubyConf 2014.
648+
649+
- [davy/benchmark-bigo](https://github.com/davy/benchmark-bigo)
650+
651+
Provides Big O notation benchmarking for Ruby.
641652

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

655+
Talk by Prem Sichanugrist @ Ruby Kaigi 2014.
656+
657+
- [Fasterer](https://github.com/DamirSvrtan/fasterer)
658+
659+
Make your Rubies go faster with this command line tool.
660+
644661

645662
## License
646663

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

649666
This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
667+
668+
669+
## Code License
670+
671+
### CC0 1.0 Universal
672+
673+
To the extent possible under law, @JuanitoFatas has waived all copyright and related or neighboring rights to "fast-ruby".
674+
675+
This work belongs to the community.

0 commit comments

Comments
 (0)