POV-Ray : Newsgroups : povray.off-topic : LOL'd at myself : Re: LOL'd at myself Server Time
6 Sep 2024 03:18:23 EDT (-0400)
  Re: LOL'd at myself  
From: nemesis
Date: 11 May 2009 15:29:27
Message: <4a087c97$1@news.povray.org>
Mike Raiford escreveu:
> Invisible wrote:
> 
>> Really? And what makes you think that? OpenGL with hardware 
>> acceleration is equally fast if you call it from C or Haskell. :-P
> 
> The original quake was not OpenGL... :) Though, they did release GLQuake.
> 
> And, isn't Haskell like an order of magnitude slower than ... just about 
> everything else?

No.  Everything else means everything besides C/C++, and hardly any 
language is able to go against it head-on.

see for yourself, against C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=gpp&lang2=ghc&box=1

pretty much on par with OCaml against C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=gpp&lang2=ocaml&box=1

which is pretty much like Pascal vs C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=gpp&lang2=fpascal&box=1

compare then to hip but slow scripting language like Python, against C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=gpp&lang2=python&box=1

or Lua (with JIT) against C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=gpp&lang2=luajit&box=1

it's amusing to see C++ using so much more memory than higher level 
languages in the mandelbrot benchmark BTW...

Fact is:  GCH provides as solid and fast implementation for a very high 
level language as possible, without getting down to low-level machinery. 
  3 times as slow as C++ at worse is not something to be ashamed of.

well, OTOH, there seems to be quite some "low-level tuning" in the 
Haskell version of fannkuch:
http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=ghc&id=5
the source is pretty much about as large and complicated as that of C++:
http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=gpp&box=1

compare to the much cleaner, though much slower, Scheme version:
http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=mzscheme&box=1

The GCC C++ fannkuch runs in 51.16 secs (1.092 KB of memory use), 
Fortran Intel at 52.26 (408 KB) Pascal at 58.79 (48 KB!!), OCaml 61.40 
(648 KB), java 6 -server 83.25 (11MB), Common Lisp SBCL 72.87 (4MB), 
Haskell 153.13 secs (4MB) and Lua with JIT at 282.69 secs (952 KB).

The rest of the tests in the benchmark, including other, non-optimized 
implementations in java, OCaml, Haskell and scripting languages, all go 
above 9 minutes of runtime!!  Including the clean code from Scheme I 
mentioned... :P  Ruby/Python/Perl take about 1 hour!

http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=all

The slow version in Haskell is beautiful though:
http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=ghc&id=3

This java version is horridly verbose and very slow:
http://shootout.alioth.debian.org/u32/benchmark.php?test=fannkuch&lang=javaxint&id=1

man, I love the shootout... ^_^


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.