Ask a Question related to Ruby, Design and Development.
-
Steven Lumos #1
ruby-talk: 80813 (Re: Rite/Ruby2.0 & Ruby vs OCaml)
Hope nobody finds this annoying. Somehow I missed this message when
it was originally sent, but I thought my reply might be useful to
sombody.
Jim Freeze wrote:I mean a Sun that is slower than my Sun. :-) If I posted Intel numbers>On Tuesday, 2 September 2003 at 4:48:58 +0900, Steven Lumos wrote:>>> Maybe you're using the wrong Sun:
>>
>> $ time ruby tail # blind gcc compile
>> 499999500000
>>
>> real 0m3.943s
>> user 0m3.910s
>> sys 0m0.000s
>What do you mean wrong Sun?
that didn't make sense, people might be likely to wonder whether I was
using a 486. I wonder something similar about the Sun numbers. In my
case, the "right" Sun happened to be an 8-way 4800 with 72GB RAM.
That's absurdly big just because I can, but the numbers are almost
identical on a Blade 2000 with 1 CPU and 1GB RAM, which is what I
would consider to be a pretty good minimum for anyone claiming to be
running a modern Sun.
I haven't, and I wouldn't be surprised to find that it isn't possible.>>> or the wrong compiler:
>>
>> $ time ruby tail # Sun compiler with optimizations[1]
>> 499999500000
>>
>> real 0m1.608s
>> user 0m1.590s
>> sys 0m0.010s
>>
>> Of course, some people care a little more about IO than addition!
>Have you tried to get the same performance with gcc?
The GCC guys have (understandably) spent a lot of time on Intel
optimization and a little time on Sun optimization. There have even
been serious bugs in Sun optimization in recent times.
But I bet you could get a lot of improvement just enabling the full
instruction set (-mcpu=ultrasparc (?)). By default, it compiles
something that will run on old SPARCs with the legendary abysmal
integer performance, so no wonder that the addition benchmark seems
slow.
Just set those in your environment (except I forgot CC=cc) and>Do you have a process for building Ruby with the
>optimizations below?
configure. Note that if you want 64-bit code, you have to have all
libraries built 64-bit too. 64-bit can be a pain sometimes so it might
not be worth it to everybody. It's worth it to me because I have a
machine with (recently upgraded to) 96GB of RAM*. I'm pretty sure you
can get the UltraSPARC instruction set in a 32-bit binary by removing
the getconf parts and the -xarch=v9. If you have the Sun compiler
tools installed, you should have documentation in
/opt/SUNWspro/docs/index.html. There is a "C User's Guide", which is
what I used to come up with the recipe.
-nofstore>> [1] CFLAGS="$(getconf LFS64_CFLAGS) -dalign -fns -ftrap=%none-D__sparc_v9__">> -xbuiltin=%all -xtarget=native -xarch=v9 -xO5Speaking of benchmarks, how about using the time Rubicon takes to>> LDFLAGS="$(getconf LFS64_LDFLAGS) -L/opt/SUNWspro/WS6U2/lib"
>> DLDFLAGS="$(getconf LFS64_LDFLAGS) -L/opt/SUNWspro/WS6U2/lib"
>> LIBS="$(getconf LFS64_LIBS) -lfast"
compare different platforms?
Steve
[*] Funny how I never cared about 64-bit until recently. :-) I never
cared about native threads until recently either.
Steven Lumos Guest
-
behaviour change of String#gsub(pattern) {|m| ... } for ruby 1.9/ruby2?
String#gsub(pattern) {|m| ... } It really would be nice to get match data in 'm', but this would surely break _a lot_ of scripts. How about... -
[Rite] Byte-Code Compiler in Ruby
Hi, I am fascinated by the many new ideas presented by matz for Rite. Why not write the whole Ruby-to-Bytecode compiler in Ruby itself? As... -
Bопpоc от ruby-talk@ruby-lang.org
ua g ap p g lw c 3 38 12 9 4 uag a p pg lw c Распродажа мониторов б/у из Японии! 21" от 200$ до 270$ 17" от 70$ до 100$ Ноутбуки от 260$.... -
Rite/Ruby2.0 & Ruby vs OCaml
Hi All, I'm new here, and I hope I don't offend anyone by mentioning a different programming language here on Ruby-Talk. I have two questions... -
Ruby => Rite, AST => Bytecode?
Matz and fellow Rubyists, On pragprog, we're sort-of discussing the creation of a new language ("Pragmatic") as an exercise in extending one's...



Reply With Quote

