[#28509] Rational — Tadayoshi Funaba <tadf@...>

ふなばです。

49 messages 2006/04/05
[#28510] Re: Rational — keiju@... (石塚圭樹) 2006/04/05

けいじゅ@いしつかです.

[#28512] Re: Rational — Tadayoshi Funaba <tadf@...> 2006/04/05

ふなばです。

[#28513] Re: Rational — Shin-ichiro HARA <sinara@...> 2006/04/05

原です。

[#28514] Re: Rational — keiju@... (石塚圭樹) 2006/04/05

けいじゅ@いしつかです.

[#28517] Re: Rational — Yukihiro Matsumoto <matz@...> 2006/04/06

まつもと ゆきひろです

[#28520] Re: Rational — keiju@... (石塚圭樹) 2006/04/06

けいじゅ@いしつかです.

[#28521] Re: Rational — Yukihiro Matsumoto <matz@...> 2006/04/06

まつもと ゆきひろです

[#28525] Re: Rational — keiju@... (石塚圭樹) 2006/04/06

けいじゅ@いしつかです.

[#28527] Re: Rational — Shin-ichiro HARA <sinara@...> 2006/04/06

原です。

[#28536] Re: Rational — Shin-ichiro HARA <sinara@...> 2006/04/10

原です。

[#28537] Re: Rational — keiju@... (石塚圭樹) 2006/04/10

けいじゅ@いしつかです.

[#28589] Float#div and Float#divmod [AGAIN] — Shin-ichiro HARA <sinara@...>

原です。

16 messages 2006/04/23

[ruby-dev:28555] 鬼車パフォーマンス

From: Yukihiro Matsumoto <matz@...>
Date: 2006-04-13 01:10:43 UTC
List: ruby-dev #28555
まつもと ゆきひろです

[ruby-talk:188721]で、以下のプログラム(特にquxと呼ばれるパター
ンにおいて)1.9(鬼車)が1.8より遅いという指摘がありました。

お知らせまで。

@re = /^\w+-\w+$/ # Some random expression
def foo(str)
  str =~ @re
end

def bar(str)
  str =~ /^\w+-\w+$/
end

def qux(str)
 str =~ Regexp.new("/^\w+-\w+$/")
end

require 'benchmark'
include Benchmark

bm(16) do |test|
  test.report("foo") do
    1_000_000.times {foo("abc-xyz")}
  end
  test.report("bar") do
    1_000_000.times {bar("abc-xyz")}
  end
  test.report("qux") do
    1_000_000.times {qux("abc-xyz")}
  end
end

In This Thread

Prev Next