Re: K interpreter
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Wed, 22 Mar 2006 22:59:40 +0000
sa wrote:
i meant to cite the ray-tracer as an example of a problem
for which a full array solution seems (currently) out of
reach. unfortunately, knowing that gets you just halfway
there.
Comparing the fastest k implementation to the slowest OCaml implementation,
the k is 974 bytes and takes 322s to run and the OCaml is 2204 bytes and
takes 28.5s.
I don't believe it is possible to design a set of adverbs that allow all
problems to be solved efficiently in k style. It is clearly possible to
design a set of adverbs that allow some problems to be solved efficiently
in k style (or Mathematica). However, how much effort does it take to
transform a problem into this style in order to get good performance?
I have ported the ray tracer to Mathematica and performance is orders of
magnitude slower than compiled languages for precisely this reason.
Moreover, it would take me a lot longer to optimise the Mathematica than it
took me to optimise the OCaml (which was very fast the first time around).
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html
.
- Follow-Ups:
- Re: K interpreter
- From: sa
- Re: K interpreter
- References:
- K interpreter
- From: Jon Harrop
- Re: K interpreter
- From: Joachim Durchholz
- Re: K interpreter
- From: Jon Harrop
- Re: K interpreter
- From: sa
- Re: K interpreter
- From: sa
- Re: K interpreter
- From: Joachim Durchholz
- Re: K interpreter
- From: sa
- Re: K interpreter
- From: Jon Harrop
- Re: K interpreter
- From: sa
- K interpreter
- Prev by Date: Re: Simple Exercise
- Next by Date: Re: K interpreter
- Previous by thread: Re: K interpreter
- Next by thread: Re: K interpreter
- Index(es):
Relevant Pages
|