Browse thread
Memory allocation nano-benchmark.
-
Christian Szegedy
- Frédéric_Gava
- Jon Harrop
- John Prevost
[
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: | Jon Harrop <jon@j...> |
| Subject: | Re: [Caml-list] Memory allocation nano-benchmark. |
On Thursday 10 February 2005 15:15, Christian Szegedy wrote: > Let us look at another example where ocaml not really shines: > ... I brought this up a while ago. IIRC, performance is poor here because of: 1. Run-time polymorphism in Array.init. 2. Blitting the array twice (once for initialisation, once for filling). I believe the former could be fixed by running source through a whole-program preprocessor to remove all polymorphism. The latter could be addressed by extending the functionality of the GC to permit extensible arrays. However, this is tricky, error-prone work on a safety-critical part of the compiler. PS: Note that this is not a test of "memory allocation" as you state but, rather, it is mainly a test of the cost of run-time polymorphism. Remove the polymorphism for a better test of memory allocation. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd.