[#24105] [Bug #1711] Marshal Failing to Round-Trip Certain Recurisve Data Structures — Run Paint Run Run <redmine@...>

Bug #1711: Marshal Failing to Round-Trip Certain Recurisve Data Structures

9 messages 2009/07/01

[#24116] [Bug #1715] Numeric#arg for NaN is Inconsistent Across Versions — Run Paint Run Run <redmine@...>

Bug #1715: Numeric#arg for NaN is Inconsistent Across Versions

10 messages 2009/07/02

[#24240] [Bug #1755] IO#reopen Doesn't Fully Associate with Given Stream on 1.9; Ignores pos on 1.8 — Run Paint Run Run <redmine@...>

Bug #1755: IO#reopen Doesn't Fully Associate with Given Stream on 1.9; Ignores pos on 1.8

8 messages 2009/07/09

[#24321] [Bug #1773] Gem path doesn't honor user gem? — Lin Jen-Shin <redmine@...>

Bug #1773: Gem path doesn't honor user gem?

12 messages 2009/07/14

[#24390] [Feature #1784] More encoding (Big5 series) support? — Lin Jen-Shin <redmine@...>

Feature #1784: More encoding (Big5 series) support?

12 messages 2009/07/16

[#24467] Re: [ruby-cvs:31226] Ruby:r24008 (ruby_1_8_6): Removed private on to_date and to_datetime. — Urabe Shyouhei <shyouhei@...>

Hello.

10 messages 2009/07/21

[#24472] [Feature #1800] rubygems can replace system executable files — Kazuhiro NISHIYAMA <redmine@...>

Feature #1800: rubygems can replace system executable files

13 messages 2009/07/21

[#24530] [Feature #1811] Default BasicSocket.do_not_reverse_lookup to true — Roger Pack <redmine@...>

Feature #1811: Default BasicSocket.do_not_reverse_lookup to true

9 messages 2009/07/23

[#24624] [Bug #1844] Immediates Should Not Respond to :dup — Run Paint Run Run <redmine@...>

Bug #1844: Immediates Should Not Respond to :dup

15 messages 2009/07/30

[ruby-core:24237] Re: Performance issue with Prime class under Ruby 1.8.6 in Windows

From: Srdjan Pejic <spejic@...>
Date: 2009-07-09 17:41:20 UTC
List: ruby-core #24237
Hello all,

Thank you all for helping out here. However, I have to withdraw this report
in embarrassment. I've actually found a bug in my code that was causing the
library function to sum up incorrectly. Note to self: Always assume you're
wrong.

In any case, once the bug was corrected, the performance of the Prime class
significantly improved. It is still more than twice as slow as the
Eratosthenes function, but I'm guessing this is something that has been
corrected in 1.9.

Here are the post-bug benchmarks for Prime class and hand-rolled
Eratosthenes:

                                               user          system
total        real
library up to 100,000                  0.687000   0.015000   0.702000 (
0.703000)
library up to 1,000,000               8.094000   0.000000   8.094000 (
8.110000)

eratosthenes up to 100,000        0.360000   0.000000   0.360000 (
0.359000)
eratosthenes up to 1,000,000     3.844000   0.032000   3.876000 (  3.875000=
)

Run # 2:
                                               user         system
total        real
library up to 100,000                 0.703000   0.000000   0.703000 (
0.703000)
library up to 1,000,000              8.125000   0.047000   8.172000 (
8.203000)
library full run: 2,000,000           8.047000   0.046000   8.093000 (
8.125000)

eratosthenes up to 100,000         0.360000   0.000000   0.360000 (
0.359000)
eratosthenes up to 1,000,000      3.906000   0.000000   3.906000 (
3.906000)
eratosthenes full run: 2,000,000   3.844000   0.032000   3.876000 (
3.875000)

Again, thanks all for your help.

Srdjan

On Thu, Jul 9, 2009 at 7:41 AM, Shot (Piotr Szotkowski) <shot@hot.pl> wrote=
:

> Gregory Brown:
>
> > Just for specific details:
>
> > sandal:~ $ ruby19 -v
> > ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.4.0]
> > sandal:~ $ uname -a
> > Darwin anatta.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24
> 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
> > sandal:~ $ time ruby19 -rprime -e "Prime.take_while { |e| e < 2_000_000
> }.inject { |s,r| s + r }"
>
> > real  0m2.956s
> > user  0m2.883s
> > sys   0m0.028s
>
> FWIW, it does indeed looks like a Windows binary issue:
>
> shot@devielle:~$ grep 'model name' /proc/cpuinfo
> model name  : Intel(R) Core(TM)2 Duo CPU     U9400  @ 1.40GHz
> model name  : Intel(R) Core(TM)2 Duo CPU     U9400  @ 1.40GHz
> shot@devielle:~$ uname -a
> Linux devielle 2.6.30-020630-generic #020630 SMP Wed Jun 10 09:04:38 UTC
> 2009 x86_64 GNU/Linux
> shot@devielle:~$ time ruby -vrprime -e 'Prime.take_while { |e| e <
> 2_000_000 }.inject(:+)'
> ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-linux]
>
> real  0m3.107s
> user  0m3.092s
> sys 0m0.012s
>
> =97 Shot
> --
> I consider chromatic to be Larry Wall=92s Thomas
> Huxley.    [Jarkko Hietaniemi, hates-software]
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkpV12QACgkQi/mCfdEo8UreFgCfQglZ6vrk2wQ2JR7sLlppxh7E
> g/MAoKTqNXpvIlmTmt1droAkKezp651T
> =3DfaN6
> -----END PGP SIGNATURE-----
>
>

In This Thread

Prev Next