Message from discussion
Mini ray tracer
Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr13.news.prodigy.com.POSTED!c72e22b2!not-for-mail
Newsgroups: comp.graphics.rendering.raytracing
Subject: Re: Mini ray tracer
References: <427de4a3$0$39077$ed2e19e4@ptn-nntp-reader04.plus.net>
<1115661088.012495.102910@z14g2000cwz.googlegroups.com>
From: Matt Pharr <m...@pharr.org>
X-Face: C!.oGaE]n@p)VF9Ss3]f'|<)kRrtpG)^^b^X-3_zhUHp\jBj29jaoTItqWR>mHa+v-{/!jx7OA@!cV0>Fm-b:zEL<`oOXG[BFQ\<q:TwWP@JNZu+VXcD2viySG/R_/|6UDo,W;w^z^NK)F\YM|xjvI[MH,"iQ~mT<g`H6;x8}8j|miQUQ&fw|!V~.N+[#69iY?|ypa*[.{bEm\JDlI<<!}p}xeb7[N-!3nT^i3Rr#M"{...@+k.QZnnuzDcre%C6}qkv$fTsSJ
Message-ID: <m2br7kz1sk.fsf@bjork.pharr.org>
Organization: mmp
User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Honest Recruiter,
linux)
Cancel-Lock: sha1:qxMjcjf389ZIX2AwA9ezVoecb0g=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 42
NNTP-Posting-Host: 66.125.65.154
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr13.news.prodigy.com 1115663879 ST000 66.125.65.154 (Mon, 09 May 2005 14:37:59 EDT)
NNTP-Posting-Date: Mon, 09 May 2005 14:37:59 EDT
X-UserInfo1: S[OIBVGDTRRWCFD[LZKJOPHAWB\^PBQLGPQRZUEK@YUDUWYAKVUOPCW[ML\JXUCKVFDYZKBMSFX^OMSAFNTINTDDMVW[X\THOPXZRVOCJTUTPC\_JSBVX\KAOTBAJBVMZTYAKMNLDI_MFDSSOLXINH__FS^\WQGHGI^C@E[A_CF\AQLDQ\BTMPLDFNVUQ_VM
Date: Mon, 09 May 2005 18:37:59 GMT
tbp...@gmail.com writes:
> Jon Harrop wrote:
>> I then cut this program down to a 66-line OCaml program and ported it
> into a
>> 97-line C++ program. These programs are compared on this page:
>>
>> http://www.ffconsultancy.com/free/ray_tracer/comparison.html
> Is that comparison supposed to be fair in any way whatsoever?
>
> [demonstration that "inline" vector math makes C++ programs faster
> elided]
>
> If your point was to show how to write unbelievably inneficient code in
> C++, you've succeeded.
I think the point was to have some fun and to make a little demo that shows
how a functional language like OCaml can give rise to nice short expressive
programs while still delivering competitive performance. And for those
goals, the OP succeeded!
Note also that he mentions on his web page that he's doing this for "the
computer language shootout benchmarks", http://shootout.alioth.debian.org/.
That page clearly points out all the caveats around benchmarks like these
(to the point that they can be effectively meaningless in the real world.)
Specifically:
>> about The Language Shootout Benchmarks
>>
>>Our goals are to learn about programming languages, compare their
>>performance in various (possibly meaningless) ways and, most importantly,
>>have some fun!
I've at least had some fun looking at his implementation!
-matt
--
Matt Pharr m...@pharr.org <URL:http://graphics.stanford.edu/~mmp>
=======================================================================
In a cruel and evil world, being cynical can allow you to get some
entertainment out of it. --Daniel Waters