Date: Fri, 8 Jun 2001 16:43:36 +0200 To: DaVinci Cc: debian-ocaml-maint at lists.debian.org, lablgtk at kaba.or.jp Subject: Re: lablgtk and slowness of examples Message-ID: <20010608164336.A12804 at lambda.u-strasbg.fr> References: <20010608103814.A32483 at fangorn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010608103814.A32483 at fangorn.net> From: Sven LUTHER Sender: Sven LUTHER On Fri, Jun 08, 2001 at 10:38:14AM +0200, DaVinci wrote: > Hello. > > I have probed lablgtk with included examples. I think it is curiously slow, > compared to same exmples of gtk with Perl, Python or Ruby. But ocaml is a > very fast script language, faster than P, P and R... > > Have you any idea of this?. > > Examples where I see difference are, above all, those where there is more > computation, like creation of NoteBook in testgtk.ml After some testing, you can try compiling to either bytecode or nativecode, and obtain a much faster start. you can do it with either : ocamlopt -I +lablgtk -labels -o testgtk.opt lablgtk.cmxa gtkInit.cmx testgtk.ml ocamlc -I +lablgtk -labels -o testgtk lablgtk.cma gtkInit.cmo testgtk.ml Either version is much faster than the toplevel one. I don't know specially what is different here though. The big advantage of ocaml over other scripting languages, is that it is a compiled language as well as a scripting one. Friendly, Sven Luther