Re: For performance, write it in OCaml
- From: "M. Edward (Ed) Borasky" <znmeb@xxxxxxxxxxx>
- Date: Thu, 3 Aug 2006 10:42:11 +0900
William James wrote:
Here's an OCaml version that runs in about 1.5 seconds when*This* expert suggests comparing performance between the C version and the Ocaml version on the *same* machine! :)
output is redirected to a file on my faster computer (3.2 GHz).
It uses the same algorithm as the C program.
The C version takes 1.961 seconds when writing to /dev/null on
the o.p.'s computer. Since this is my first OCaml program, I'm
certain an expert could improve it.
An expert did suggest replacing a couple of lists with arrays.
This should be a bit faster.
.
- Follow-Ups:
- Re: For performance, write it in OCaml
- From: Peter Hickman
- Re: For performance, write it in OCaml
- From: Jon Harrop
- Re: For performance, write it in OCaml
- References:
- For performance, write it in C - Part 3, Source code now available
- From: Peter Hickman
- Re: For performance, write it in C - Part 3, Source code now available
- From: Kristof Bastiaensen
- For performance, write it in OCaml
- From: William James
- Re: For performance, write it in OCaml
- From: William James
- For performance, write it in C - Part 3, Source code now available
- Prev by Date: Re: cross-platform microsoft access parser
- Next by Date: Re: spread your best code-snippets
- Previous by thread: Re: For performance, write it in OCaml
- Next by thread: Re: For performance, write it in OCaml
- Index(es):