Re: [Gambas-user] New JIT Compiler

2012-05-24 Thread Benoît Minisini
Le 24/05/2012 19:49, Jussi Lahtinen a écrit : > Great work guys! > > Documentation still contains following sentence: > "Gambas is an interpreted language, > with no "just-in-time" or other compilation to native code at all." > > http://gambasdoc.org/help/doc/

Re: [Gambas-user] New JIT Compiler

2012-05-24 Thread Jussi Lahtinen
Great work guys! Documentation still contains following sentence: "Gambas is an interpreted language, with no "just-in-time" or other compilation to native code at all." http://gambasdoc.org/help/doc/benchmark Jussi On 24 May 2012 01:39, Benoît Minisi

Re: [Gambas-user] New JIT Compiler, STOOOOP !

2012-05-23 Thread Emil Lenngren
Me to. Bye. 2012/5/24 Ru Vuott > Ok, component works. > Thanks Emil, thanks Benoit. > > I go to slep ! ;-) > > bye > Vuot > > > -- > Live Security Virtual Conference > Exclusive live event will cover all the

Re: [Gambas-user] New JIT Compiler, STOOOOP !

2012-05-23 Thread Ru Vuott
Ok, component works. Thanks Emil, thanks Benoit. I go to slep ! ;-) bye Vuot -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed

Re: [Gambas-user] New JIT Compiler, Trying.... QUINQUES

2012-05-23 Thread Ru Vuott
> Try without 'Fast' and see how long time you can wait before > you get bored > and abort it ;) ... Emil... you are crazy ! ;-) You want to make me fool ! :-D -- Live Security Virtual Conference Exclusive live event

Re: [Gambas-user] New JIT Compiler, Trying.... SEXIES

2012-05-23 Thread Ru Vuott
> Try to see the difference with the "Polygon" benchmark as > well. Yes, I tried now "without" Fast... Emil... oh my God ! Totally incomparable !! -- Live Security Virtual Conference Exclusive live event will cover all

Re: [Gambas-user] New JIT Compiler, Trying.... QUINQUES

2012-05-23 Thread Emil Lenngren
Nice! Try without 'Fast' and see how long time you can wait before you get bored and abort it ;) 2012/5/24 Ru Vuott > > > Do you have the keyword "Fast" at the > > beginning? > > > > How long did it take to run the code? A minute or a few > > seconds? > > > > A few seconds (5 or 6 I suppose.) >

Re: [Gambas-user] New JIT Compiler, Trying.... QUINQUES

2012-05-23 Thread Ru Vuott
> Do you have the keyword "Fast" at the > beginning? > > How long did it take to run the code? A minute or a few > seconds? > A few seconds (5 or 6 I suppose.) -- Live Security Virtual Conference Exclusive live event w

Re: [Gambas-user] New JIT Compiler, Trying.... SEXIES

2012-05-23 Thread Emil Lenngren
Nice! Try to see the difference with the "Polygon" benchmark as well. 2012/5/24 Ru Vuott > If 1 is too big, try a lower value. > > > > Regards, > > > > -- > > Benoît Minisini > > > > > Good suggestion, Benoît ! > > I changed value: from 1 to 10 > > So, I tri

Re: [Gambas-user] New JIT Compiler, Trying.... SEXIES

2012-05-23 Thread Ru Vuott
If 1 is too big, try a lower value. > > Regards, > > -- > Benoît Minisini > Good suggestion, Benoît ! I changed value: from 1 to 10 So, I tried "with" and "without" the word "FAST". I can see the difference !! :-) I think it works ! Oh, yes

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Emil Lenngren
Ok, so try to replace the JIT_load method in main/gbx/gbx_jit.c with this one: bool JIT_load(){ static bool loaded = FALSE; static bool available = TRUE; if (loaded) return TRUE; if (!available) return FALSE; COMPONENT_load(COMPONENT_create("gb.jit")); LIBRARY_get_interface_by_name("gb.jit", JI

Re: [Gambas-user] New JIT Compiler, Trying.... QUATER

2012-05-23 Thread Emil Lenngren
The thing is that llvm optimizes away that loop (at least on my 64-bit computer), so it should take 0 seconds ;) 2012/5/24 Benoît Minisini > Le 24/05/2012 02:32, Ru Vuott a écrit : > >> > >> CPU must be at 100% (on one core) in both case. The JIT > >> compiled > >> function is just faster. > >>

Re: [Gambas-user] New JIT Compiler, Trying.... QUATER

2012-05-23 Thread Benoît Minisini
Le 24/05/2012 02:32, Ru Vuott a écrit : >> >> CPU must be at 100% (on one core) in both case. The JIT >> compiled >> function is just faster. >> >> Just try with the FAST keyword, and without, and compare the >> execution time. >> >> -- >> Benoît Minisini >> >> > > I have 4 core. I tried "with" and

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Emil Lenngren
Gambas scripts are runned by the gbs3 scripter, that takes your script, makes a class of it, take the code outside all the functions and put it in a Main method. It is then run normally by first compiling it with gbc3 and then running it with gbx3 .. kind of .. ;) See source code here: http://gamba

Re: [Gambas-user] New JIT Compiler, Trying.... QUINQUES

2012-05-23 Thread Emil Lenngren
Do you have the keyword "Fast" at the beginning? How long did it take to run the code? A minute or a few seconds? 2012/5/24 Ru Vuott > > > > > > Try to run the benchmark > > > http://gambasdoc.org/help/doc/benchmark/polynom > > > and > > > > > I

Re: [Gambas-user] New JIT Compiler, Trying.... QUINQUES

2012-05-23 Thread Ru Vuott
> > > Try to run the benchmark > > http://gambasdoc.org/help/doc/benchmark/polynom > > and > I wrote it: Public Sub Button1_Click() Dim I As Integer For I = 1 To 10 Print Test(0.2) Next End Sub Test(X As Float) As Float Dim Mu As Flo

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Ru Vuott
> Try to run the benchmark > http://gambasdoc.org/help/doc/benchmark/polynom > and ...I don't understand that strange: End Dim I As Integer For I = 1 To 10 Print Test(0.2) Next --

Re: [Gambas-user] New JIT Compiler, Trying.... QUATER

2012-05-23 Thread Ru Vuott
> > CPU must be at 100% (on one core) in both case. The JIT > compiled > function is just faster. > > Just try with the FAST keyword, and without, and compare the > execution time. > > -- > Benoît Minisini > > I have 4 core. I tried "with" and "without" the word: Fast, but one CPU stays on

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Emil Lenngren
As long as you have the latest installed version of gbx3, you should be fine. Try to run the benchmark http://gambasdoc.org/help/doc/benchmark/polynom and add a line 'Fast' on the line after #!/usr/bin/env gbs3 If your time is < 10 seconds, the jit i

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Benoît Minisini
Le 24/05/2012 02:24, Ru Vuott a écrit : > >> Well now bg.jit.so exists ! >> > > I tried your code, but it doesn't work, and CPU is at 100%. > > Maybe, I must re-updated gambas3 from ./reconf etc ? > CPU must be at 100% (on one core) in both case. The JIT compiled function is just faster. Just tr

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Ru Vuott
> Well now bg.jit.so exists ! > I tried your code, but it doesn't work, and CPU is at 100%. Maybe, I must re-updated gambas3 from ./reconf etc ? -- Live Security Virtual Conference Exclusive live event will cover all t

Re: [Gambas-user] New JIT Compiler, Trying.... TER

2012-05-23 Thread Ru Vuott
Well now bg.jit.so exists ! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include end

Re: [Gambas-user] New JIT Compiler, Trying.... BIS

2012-05-23 Thread Ru Vuott
--- Gio 24/5/12, Emil Lenngren ha scritto: > Da: Emil Lenngren > Oggetto: Re: [Gambas-user] New JIT Compiler, Trying BIS > A: "mailing list for gambas users" > Data: Giovedì 24 maggio 2012, 02:12 > Ok. So again :) what is the full > output when you run ./

Re: [Gambas-user] New JIT Compiler, Trying.... BIS

2012-05-23 Thread Emil Lenngren
Ok. So again :) what is the full output when you run ./configure in the directory gb.jit, followed by make and sudo make install? /Emil 2012/5/24 Ru Vuott > ...no, it doesn't !!! > > > > --- Gio 24/5/12, Emil Lenngren ha scritto: > > > Da: Emil Lenngren > >

Re: [Gambas-user] New JIT Compiler, Trying.... BIS

2012-05-23 Thread Ru Vuott
...no, it doesn't !!! --- Gio 24/5/12, Emil Lenngren ha scritto: > Da: Emil Lenngren > Oggetto: Re: [Gambas-user] New JIT Compiler, Trying BIS > A: "mailing list for gambas users" > Data: Giovedì 24 maggio 2012, 01:57 > No, it is loaded automatically by

Re: [Gambas-user] New JIT Compiler, Trying.... BIS

2012-05-23 Thread Emil Lenngren
No, it is loaded automatically by the interpreter. Does the file /usr/lib/gambas3/gb.jit.so or /usr/local/lib/gambas3/gb.jit.soexist? 2012/5/24 Ru Vuott > > A question: > > gb.jit has to show in components window of project ? > > >

Re: [Gambas-user] New JIT Compiler, Trying.... BIS

2012-05-23 Thread Ru Vuott
A question: gb.jit has to show in components window of project ? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can

Re: [Gambas-user] New JIT Compiler, Trying....

2012-05-23 Thread Ru Vuott
> To test if it really works, try running this code: > > Fast    'On first row in the class file > Public Sub Main() >   Dim i As Long >   For i = 1 To 1 >   Next >   Print "It works!" > End > > If it immediately prints out "It works!", it works. If the > cpu is at 100%, > the jit com

Re: [Gambas-user] New JIT Compiler, SUCCESS !

2012-05-23 Thread Emil Lenngren
Good idea! 2012/5/24 Benoît Minisini > Le 24/05/2012 01:19, Emil Lenngren a écrit : > > Nice! > > > > To test if it really works, try running this code: > > > > Fast'On first row in the class file > > Public Sub Main() > >Dim i As Long > >For i = 1 To 1 > >Next > >

Re: [Gambas-user] New JIT Compiler, SUCCESS !

2012-05-23 Thread Benoît Minisini
Le 24/05/2012 01:19, Emil Lenngren a écrit : > Nice! > > To test if it really works, try running this code: > > Fast'On first row in the class file > Public Sub Main() >Dim i As Long >For i = 1 To 1 >Next >Print "It works!" > End > > If it immediately prints out "It

Re: [Gambas-user] New JIT Compiler, SUCCESS !

2012-05-23 Thread Emil Lenngren
Nice! To test if it really works, try running this code: Fast'On first row in the class file Public Sub Main() Dim i As Long For i = 1 To 1 Next Print "It works!" End If it immediately prints out "It works!", it works. If the cpu is at 100%, the jit compiler is not in use

Re: [Gambas-user] New JIT Compiler, SUCCESS !

2012-05-23 Thread Ru Vuott
> > You must issue a ./reconf before ./configure -C. > -- > Benoît Minisini > SUCCESS - SUCCESS - SUCCESS !!! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and t

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Ru Vuott
> > You must issue a ./reconf before ./configure -C. I had the > same problem > after having issued a ./configure inside the gb.jit > directory. > > -- > Benoît Minisini > Thanks Benoît, I'm trying again from ~/trunk $ ./reconf ... ---

Re: [Gambas-user] New JIT Compiler, but..... 2

2012-05-23 Thread Ru Vuott
..a moment ! I came back to look results: ~/trunk/gb.jit $ sudo make install make[1]: Entering directory `/home/ploppo/trunk/gb.jit' make[2]: Entering directory `/home/ploppo/trunk/gb.jit' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Emil Lenngren
Haha. I don't really know exactly how the gambas build system works, but if it installed the gb.jit.so file then it has compiled correctly, and you can avoid that message ... :) 2012/5/24 Ru Vuott > > > In gambas top-level: > > rm gb.jit/DISABLED* > > > > ;) > > Excuse me, but I'm enought ignora

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Benoît Minisini
Le 24/05/2012 01:00, Ru Vuott a écrit : > >> In gambas top-level: >> rm gb.jit/DISABLED* >> >> ;) > > Excuse me, but I'm enought ignorant. :-( > > Well, I followed that, and I removed those file successfully. > Then I launched in gb.jit directory MAKE and sudo Make install > OK > Then re-launched

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Ru Vuott
> In gambas top-level: > rm gb.jit/DISABLED* > > ;) Excuse me, but I'm enought ignorant. :-( Well, I followed that, and I removed those file successfully. Then I launched in gb.jit directory MAKE and sudo Make install OK Then re-launched ~/trunk $ ./configure -C But... I have that problem aga

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread tobi
On Thu, 24 May 2012, Emil Lenngren wrote: > On ubuntu, the llvm-3.0 package (which does not work for me) provides a > llvm-config in the directory /usr/lib/llvm-3.0/bin/llvm-config, and not in > /usr/bin. That directory was not in my $PATH. > > And how to link to a library in a directory other tha

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Emil Lenngren
In gambas top-level: rm gb.jit/DISABLED* ;) 2012/5/24 Ru Vuott > > Try to remove any gb.jit/DISABLED* files left > > behind and then run make followed by sudo make install in > > the gb.jit directory. > > > > Excuse me, How can I remove those files ? Directly from their folder ? If > yes, which

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Ru Vuott
> Try to remove any gb.jit/DISABLED* files left > behind and then run make followed by sudo make install in > the gb.jit directory. > Excuse me, How can I remove those files ? Directly from their folder ? If yes, which folder ? ---

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Emil Lenngren
On ubuntu, the llvm-3.0 package (which does not work for me) provides a llvm-config in the directory /usr/lib/llvm-3.0/bin/llvm-config, and not in /usr/bin. That directory was not in my $PATH. And how to link to a library in a directory other than /usr/lib? I always have to set the environment fla

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Benoît Minisini
Le 23/05/2012 22:20, Emil Lenngren a écrit : > Hi everybody. > > I've been working on a JIT-compiler for Gambas for some months, and I'm now > ready to release an alpha-version in the latest svn of Gambas. > The compiler uses LLVM to produce machine code for x86 or x86_64. You need > LLVM on your c

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Emil Lenngren
It seemed to work this time. Try to remove any gb.jit/DISABLED* files left behind and then run make followed by sudo make install in the gb.jit directory. 2012/5/24 Ru Vuott > > > Go to the gb.jit directory. Then try > > to run ./configure without the -C flag. > > If it doesn't work, please post

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Ru Vuott
> Go to the gb.jit directory. Then try > to run ./configure without the -C flag. > If it doesn't work, please post the full output from the > configure script. Well, I followed your suggestion: ~/trunk/gb.jit $ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking w

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Benoît Minisini
Le 24/05/2012 00:26, Emil Lenngren a écrit : > Go to the gb.jit directory. Then try to run ./configure without the -C flag. > If it doesn't work, please post the full output from the configure script. > > I think it is hard to make a good configure script for llvm, because it is > not standardized

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Emil Lenngren
Go to the gb.jit directory. Then try to run ./configure without the -C flag. If it doesn't work, please post the full output from the configure script. I think it is hard to make a good configure script for llvm, because it is not standardized where llvm put its files (llvm from svn puts it somewh

Re: [Gambas-user] New JIT Compiler, but.....

2012-05-23 Thread Ru Vuott
Hi, After the installation, I launched again: ~ $ ./configure -C ...because I was updating via SVN my Gambas-3. Well, I now received these notice from terminal: || || gb.jit is disabled || and at end: || || THESE COMPONENTS ARE DISABLED: || - gb.jit || ...I do not understand I did inst

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Adrien Prokopowicz
Le mercredi 23 mai 2012 23:12:35 Ru Vuott a écrit : > Well, > > I finished installation. It was OK. I had not problems. > > > > -- Live Security Virtual Conference > Exclusive live event will cover all the ways today's

Re: [Gambas-user] New JIT Compiler: About word "Fast"

2012-05-23 Thread Emil Lenngren
Yes it is ;) It should be added to the documentation ... /Emil 2012/5/24 Ru Vuott > <> > > > Is this little example right ? > > *** > ' Gambas Class file > > > Fast > > > Public Sub Form_Open() > . > . > > > * >

[Gambas-user] New JIT Compiler: About word "Fast"

2012-05-23 Thread Ru Vuott
<> Is this little example right ? *** ' Gambas Class file Fast Public Sub Form_Open() . . * ...or not ? -- Live Security Virtual

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Ru Vuott
Well, I finished installation. It was OK. I had not problems. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can re

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Emil Lenngren
I think you need to run a ./reconf and a ./configure (with the appropriate configure options, like --prefix=/usr etc.) in the /main directory. 2012/5/24 Adrien Prokopowicz > Le mercredi 23 mai 2012 23:59:21 Emil Lenngren a écrit : > > The interpreter works without gb.jit. If gb.jit is unavailabl

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Adrien Prokopowicz
Le mercredi 23 mai 2012 23:59:21 Emil Lenngren a écrit : > The interpreter works without gb.jit. If gb.jit is unavailable, it falls > back to the interpreter instead. > > /Emil > > 2012/5/23 Adrien Prokopowicz > > > Le mercredi 23 mai 2012 22:24:59 Emil Lenngren a écrit : > > > Forgot to mentio

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread William Cabrera
ile or directory >> >> What before .../configure ? >> >> >> >> >> >> >> --- Mer 23/5/12, Emil Lenngren ha scritto: >> >> > Da: Emil Lenngren >> > Oggetto: Re: [Gambas-user] New JIT Compiler. >> > A: "mai

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread Ru Vuott
OK ! ;-) Thanks Emil ! --- Gio 24/5/12, Emil Lenngren ha scritto: > Da: Emil Lenngren > Oggetto: Re: [Gambas-user] New JIT Compiler. > A: "mailing list for gambas users" > Data: Giovedì 24 maggio 2012, 00:00 > Note the two dots (..) before > configure ;)

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread William Cabrera
> > and I received: > > bash: /configure: No such file or directory > > What before .../configure ? > > > > > > > --- Mer 23/5/12, Emil Lenngren ha scritto: > > > Da: Emil Lenngren > > Oggetto: Re: [Gambas-user] New JIT Compiler. > > A: &qu

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread Emil Lenngren
imized --enable-jit > --enable-shared > > and I received: > > bash: /configure: No such file or directory > > What before .../configure ? > > > > > > > --- Mer 23/5/12, Emil Lenngren ha scritto: > > > Da: Emil Lenngren > > Oggetto: Re: [

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Emil Lenngren
The interpreter works without gb.jit. If gb.jit is unavailable, it falls back to the interpreter instead. /Emil 2012/5/23 Adrien Prokopowicz > Le mercredi 23 mai 2012 22:24:59 Emil Lenngren a écrit : > > Forgot to mention that the 64-bit version is probably more bug-free than > > the 32-bit ver

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread Ru Vuott
Da: Emil Lenngren > Oggetto: Re: [Gambas-user] New JIT Compiler. > A: "mailing list for gambas users" > Data: Mercoledì 23 maggio 2012, 23:48 > Hi! > Have you installed LLVM by following these instructions?: > http://gambas.svn.sourceforge.net/viewvc/gambas/gambas/

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread Emil Lenngren
Hi! Have you installed LLVM by following these instructions?: http://gambas.svn.sourceforge.net/viewvc/gambas/gambas/trunk/gb.jit/README?view=markup&pathrev=4759 svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm cd llvm mkdir build cd build ../configure --prefix=/usr --enable-optimized --ena

Re: [Gambas-user] New JIT Compiler.....

2012-05-23 Thread Ru Vuott
Hello, I try to update via SVN. Well, I launched ~ $ ./configure -C but I received these notices: || || Unable to find file: llvm/LLVMContext.h || Unable to find file: libLLVM-3.2svn.so || gb.jit is disabled || and at end: || || THESE COMPONENTS ARE DISABLED: || - gb.jit || ...What do I do ?

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Benoît Minisini
Le 23/05/2012 22:20, Emil Lenngren a écrit : > Hi everybody. > > I've been working on a JIT-compiler for Gambas for some months, and I'm now > ready to release an alpha-version in the latest svn of Gambas. > The compiler uses LLVM to produce machine code for x86 or x86_64. You need > LLVM on your c

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Adrien Prokopowicz
Le mercredi 23 mai 2012 22:24:59 Emil Lenngren a écrit : > Forgot to mention that the 64-bit version is probably more bug-free than > the 32-bit version, since I myself have a 64-bit computer and therefore > have run only some few tests on 32-bit... > ---

Re: [Gambas-user] New JIT Compiler

2012-05-23 Thread Emil Lenngren
Forgot to mention that the 64-bit version is probably more bug-free than the 32-bit version, since I myself have a 64-bit computer and therefore have run only some few tests on 32-bit... -- Live Security Virtual Conference

[Gambas-user] New JIT Compiler

2012-05-23 Thread Emil Lenngren
Hi everybody. I've been working on a JIT-compiler for Gambas for some months, and I'm now ready to release an alpha-version in the latest svn of Gambas. The compiler uses LLVM to produce machine code for x86 or x86_64. You need LLVM on your computer for it to work, preferably the latest version fr