Re: lablgtk and slowness of examples
On Sat, Jun 09, 2001 at 01:01:09AM +0900, Jacques Garrigue wrote:
> > 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
>
> You should also add "-w s", to avoid all these silly warnings about the
> return type being not unit. You can see it in the lablgtk script.
Why not add the propper ignore (...) to the examples ?, like in :
- button #connect#clicked ~callback: window#destroy;
+ ignore (button #connect#clicked ~callback: window#destroy);
> > Either version is much faster than the toplevel one. I don't know specially
> > what is different here though.
>
> That's very strange. Trees are built an order faster with the bytecode
> compiled version rather than the toplevel one.
> I also tried loading testgtk.cmo in the toplevel, and this is also
> fast.
>
> I have no idea why it is so. I always believed that the toplevel
> compiled to bytecode exactly as ocamlc, and should provide the same
> speed. This is certainly not a source code interpreter.
> I'll have to ask Xavier about this one.
Strange indeed, ...
could it be something related with the parsing issue ?
Friendly,
Sven Luther
Reply to: