Browse thread
AST versus Ocaml
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jan Kybic <kybic@f...> |
| Subject: | Re: [Caml-list] ATS versus Ocaml |
> On Wednesday 04 November 2009 22:21:24 Jan Kybic wrote: >> > and crashes rather than performance. Moreover, I would note that the >> > performant ATS code out there seems to go to *great* lengths to avoid the >> > GC whenever possible, so I suspect it is extremely slow in the context of >> > heavily allocating code or many short-lived values (much like HLVM). For >> >> This will be easy to test. > > I'd like to know what you find in this respect. Here are my preliminary results. Please note that I am a beginner in ATS so my ATS code is rather ugly. But it is a more or less direct translation from Ocaml. I imagine the ATS results can be improved. I have asked at the ATS list about that. I have implemented two benchmarks: - eight queens, I actually used ten. I believe the original Ocaml implementation was probably yours. It uses lists as a primary structure, so there is a lot of allocations. On this task, ATS needs about 50% more time than Ocaml. - bubble sort on an array of doubles. Here ATS is more than 10 times faster than Ocaml (for n=10000). My code can be found at http://cmp.felk.cvut.cz/~kybic/share/ats_tests.zip Jan -- ------------------------------------------------------------------------- Jan Kybic <kybic@fel.cvut.cz> tel. +420 2 2435 5721 http://cmp.felk.cvut.cz/~kybic ICQ 200569450