[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>
I'll try to be brief so we can discuss all this. tl;dr: RubySpec is
19 messages
2015/01/05
[#67353] Re: Future of test suites for Ruby
— Tanaka Akira <akr@...>
2015/01/05
2015-01-06 7:18 GMT+09:00 Charles Oliver Nutter <headius@headius.com>:
[#67444] [ruby-trunk - Feature #10718] [Open] IO#close should not raise IOError on closed IO objects. — akr@...
Issue #10718 has been reported by Akira Tanaka.
3 messages
2015/01/09
[#67689] Keyword Arguments — Anthony Crumley <anthony.crumley@...>
Please forgive my ignorance as I am new to MRI development and am still
5 messages
2015/01/20
[#67733] [ruby-trunk - Bug #10761] Marshal.dump 100% slower in 2.2.0 vs 2.1.5 — normalperson@...
Issue #10761 has been updated by Eric Wong.
4 messages
2015/01/21
[#67736] Re: [ruby-trunk - Bug #10761] Marshal.dump 100% slower in 2.2.0 vs 2.1.5
— Eric Wong <normalperson@...>
2015/01/22
normalperson@yhbt.net wrote:
[#67772] Preventing Redundant Email Messages — Jeremy Evans <code@...>
For a long time, I've wondered why I sometimes receive redundant email
5 messages
2015/01/23
[ruby-core:67822] [ruby-trunk - Feature #10785] [Open] [PATCH1/1] [ja/en] 特定のケースでMath.cを3倍速く / Make Math.c 3 times faster in a certain situation
From:
mail@...
Date:
2015-01-27 02:17:35 UTC
List:
ruby-core #67822
Issue #10785 has been reported by gogo tanaka.
----------------------------------------
Feature #10785: [PATCH1/1] [ja/en] 特定のケースでMath.cを3倍速く / Make Math.c 3 times faster in a certain situation
https://bugs.ruby-lang.org/issues/10785
* Author: gogo tanaka
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
English follows japanese. Because my english is not good ;(
拙い英語のため両言語で補足をします.
`FIXNUM_P(x)`が真を取る際には `(double)FIX2LONG(x)` で、その他の場合は `NUM2DBL(x)` でCの値にするようにしてみました.
速度についてですが、引数が`Fixnum`, `Bignum`オブジェクトである時に限り有意な差を確認することが出来ました.
またその他のケースに対する影響は気になるほどではないと考えています.
色々至らぬところがある気がするので、何かありました際にはお気軽にお申し付け下さい.
Hi, now I use `(double)FIX2LONG(x)` instead of `NUM2DBL(x)` when `FIXNUM_P(x)` is true.
I can found it make almost all Math's module_function faster about 3 times,
only when arg(s) is `Fixnum` or `Bignum` object.
i feel like I make some mistakes, so please feel free to let me know.
1試行を抜粋
$ cat bench.rb
```
require 'benchmark'
puts Benchmark.measure { 10000000.times { Math.cos(1) } }
puts Benchmark.measure { 10000000.times { Math.cos((1 << 100)) } }
puts Benchmark.measure { 10000000.times { Math.cos(1.0) } }
puts Benchmark.measure { 10000000.times { Math.cos(1/3r) } }
```
# before
```
4.280000 0.060000 4.340000 ( 4.690771)
7.000000 0.090000 7.090000 ( 7.240859)
1.430000 0.020000 1.450000 ( 1.644737)
5.950000 0.100000 6.050000 ( 6.236341)
```
# after
```
1.340000 0.000000 1.340000 ( 1.359663)
3.770000 0.050000 3.820000 ( 3.917417)
1.370000 0.010000 1.380000 ( 1.395028)
6.080000 0.070000 6.150000 ( 6.255340)
```
--
https://bugs.ruby-lang.org/