[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lablgtk and slowness of examples



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



Reply to: