From: Ryan Tarpine Date: 2001-08-22T21:43:18+09:00 Subject: [ruby-talk:20110] Re: [patch] block memory allocation scheme - bmalloc Renaud HEBERT wrote: > MikkelFJ wrote: > [] >> I believe OCaml has an interesting generational, incremental garbage >> collector www.ocaml.org , but I >> haven't look at it in detail. > > OFF-TOPIC, mode dream on > I'm drooling: OCaml has nearly the speed of raw C.. > > I wish that Ruby could be as fast as OCaml because I really can't stand > the syntax of OCaml.. (No, I don't want to start a flamewar this is just > my opinion, your mileage may vary of course). > > I've read here about some common back-end for Perl/Python/Ruby, the > project Parrot I think. > > Given that OCaml is one of the fastest interpreted language, I'm > wondering if some things could not be reused from this project for the > back-end at least.. > I am new to both OCaml and Ruby, so correct me if I'm wrong, but as far far as I know one of the reasons OCaml is so fast is because of the strong type checking. Making a function that just adds one to the argument (function x -> x + 1) automatically works only with integers. Not even floats because they use the "+." operand. OCaml minimizes run-time type checking, which of course in Ruby is not possible because the object's methods must be queried and called. I doubt Ruby will ever reach such speeds. But I'm sure it will at least surpass Perl soon -- Ryan Tarpine, rtarpine@hotmail.com "Technology is a queer thing. It brings you great gifts in one hand, and it stabs you in the back with the other." -- C.P. Snow