HXCPP version 0.2

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

HXCPP version 0.2

Gamehaxe
Hi all,

I have updated the c++ backend to 0.2.  The main goal of this release
was to improve performance and settle on a basic structure for
the objects.

I changed from using reference counting to using garbage collection
and got a big performance win (and it simplified things too).
For the Physaxe demo (pentagonal rain, opengl mode) performance
went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
and 8 fps for neko.

You can download files from
http://gamehaxe.com/2008/11/10/hxcpp-02-huge-performance-increase/

Hugh

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Franco Ponticelli
Wonderful, great job!

Franco.

On Mon, Nov 10, 2008 at 12:48 PM, Hugh Sanderson <[hidden email]> wrote:
Hi all,

I have updated the c++ backend to 0.2.  The main goal of this release
was to improve performance and settle on a basic structure for
the objects.

I changed from using reference counting to using garbage collection
and got a big performance win (and it simplified things too).
For the Physaxe demo (pentagonal rain, opengl mode) performance
went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
and 8 fps for neko.

You can download files from
http://gamehaxe.com/2008/11/10/hxcpp-02-huge-performance-increase/

Hugh

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Franco Ponticelli
The OpenGL demo is simply amazing.

On Mon, Nov 10, 2008 at 1:19 PM, Franco Ponticelli <[hidden email]> wrote:
Wonderful, great job!

Franco.


On Mon, Nov 10, 2008 at 12:48 PM, Hugh Sanderson <[hidden email]> wrote:
Hi all,

I have updated the c++ backend to 0.2.  The main goal of this release
was to improve performance and settle on a basic structure for
the objects.

I changed from using reference counting to using garbage collection
and got a big performance win (and it simplified things too).
For the Physaxe demo (pentagonal rain, opengl mode) performance
went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
and 8 fps for neko.

You can download files from
http://gamehaxe.com/2008/11/10/hxcpp-02-huge-performance-increase/

Hugh

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Lee Sylvester
In reply to this post by Gamehaxe
This is absolutely fantastic. Well done, Hugh!

Lee




Hugh Sanderson wrote:

> Hi all,
>
> I have updated the c++ backend to 0.2.  The main goal of this release
> was to improve performance and settle on a basic structure for
> the objects.
>
> I changed from using reference counting to using garbage collection
> and got a big performance win (and it simplified things too).
> For the Physaxe demo (pentagonal rain, opengl mode) performance
> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
> and 8 fps for neko.
>
> You can download files from
> http://gamehaxe.com/2008/11/10/hxcpp-02-huge-performance-increase/
>
> Hugh
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Nicolas Cannasse
In reply to this post by Gamehaxe
Hugh Sanderson a écrit :

> Hi all,
>
> I have updated the c++ backend to 0.2.  The main goal of this release
> was to improve performance and settle on a basic structure for
> the objects.
>
> I changed from using reference counting to using garbage collection
> and got a big performance win (and it simplified things too).
> For the Physaxe demo (pentagonal rain, opengl mode) performance
> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
> and 8 fps for neko.

Great work ;)

Just a small question : what does hxcpp.dll contains ? 492 KB seems big,
are you sure it's not compiled as debug version ?

Best,
Nicolas


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Zjnue Brzavi
In reply to this post by Gamehaxe
congrats!

On Mon, Nov 10, 2008 at 12:48 PM, Hugh Sanderson <[hidden email]> wrote:

> Hi all,
>
> I have updated the c++ backend to 0.2.  The main goal of this release
> was to improve performance and settle on a basic structure for
> the objects.
>
> I changed from using reference counting to using garbage collection
> and got a big performance win (and it simplified things too).
> For the Physaxe demo (pentagonal rain, opengl mode) performance
> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
> and 8 fps for neko.
>
> You can download files from
> http://gamehaxe.com/2008/11/10/hxcpp-02-huge-performance-increase/
>
> Hugh
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Gamehaxe
In reply to this post by Franco Ponticelli
> The OpenGL demo is simply amazing.
>

Yes, the line quality is a bit down, but never mind the
quality, feel the width.

Hugh




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Gamehaxe
In reply to this post by Nicolas Cannasse
Hi,
It contains some standard code (base classes, string, array, anon) the
gc.lib (which is about 276 kb) and is statically linked with the
c++ runtime library.  Some space could be saved by dynamic linking
with the runtime, but I try to avoid this where possible.
Ultimately I may link against the vc6 dll as per neko.

Hugh

> Hugh Sanderson a écrit :
>> Hi all,
>>  I have updated the c++ backend to 0.2.  The main goal of this release
>> was to improve performance and settle on a basic structure for
>> the objects.
>>  I changed from using reference counting to using garbage collection
>> and got a big performance win (and it simplified things too).
>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>> and 8 fps for neko.
>
> Great work ;)
>
> Just a small question : what does hxcpp.dll contains ? 492 KB seems big,  
> are you sure it's not compiled as debug version ?
>
> Best,
> Nicolas
>
>



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Lee Sylvester
I like having everything compiled into as small a number of dll's as
possible. However, if you're gonna have to compile the output anyway,
couldn't one compile the hxcpp.dll code into their output application? :-D

Lee





Hugh Sanderson wrote:

> Hi,
> It contains some standard code (base classes, string, array, anon) the
> gc.lib (which is about 276 kb) and is statically linked with the
> c++ runtime library.  Some space could be saved by dynamic linking
> with the runtime, but I try to avoid this where possible.
> Ultimately I may link against the vc6 dll as per neko.
>
> Hugh
>
>> Hugh Sanderson a écrit :
>>> Hi all,
>>>  I have updated the c++ backend to 0.2.  The main goal of this release
>>> was to improve performance and settle on a basic structure for
>>> the objects.
>>>  I changed from using reference counting to using garbage collection
>>> and got a big performance win (and it simplified things too).
>>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>>> and 8 fps for neko.
>>
>> Great work ;)
>>
>> Just a small question : what does hxcpp.dll contains ? 492 KB seems
>> big, are you sure it's not compiled as debug version ?
>>
>> Best,
>> Nicolas
>>
>>
>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Gamehaxe
In theory yes, and also if you did not need any external dlls (eg,  
nme.dll).
Currently, hxcpp.dll is first compiled to generate a .dll and a .lib.
The nme.dll is then linked against this lib - this essentially instructs
nme.dll to look for the external symbols in the "hxcpp" dll.
It would be quite possible to link the exe directly into the hxcpp
code.  In this case you would get an "exe.lib", which you would then
link the nme.dll against and everything would work.  It would even
be possible (perhaps even desirable) to put all these into one
big project and link without dependencies.  But then you would need
all the files to build nme etc.  Also, there may be GPL issues
(although I think Boehm GC is pretty developer firendly).
Another idea I had was to also provide a "hxcpp_static.lib"
so the developer could easily switch (there is a #define SHARED
that can be modified).
The implicit dynamic linking could also be replaced with explicit
symbol passing to reduce the dll link order issues too.

So to recap, yes quite easilly if you didn't want to link against
external dynamic libraries, and yes, it is _possible_ even if you did.

Hugh


> I like having everything compiled into as small a number of dll's as  
> possible. However, if you're gonna have to compile the output anyway,  
> couldn't one compile the hxcpp.dll code into their output application?  
> :-D
>
> Lee
>
>
>
>
>
> Hugh Sanderson wrote:
>> Hi,
>> It contains some standard code (base classes, string, array, anon) the
>> gc.lib (which is about 276 kb) and is statically linked with the
>> c++ runtime library.  Some space could be saved by dynamic linking
>> with the runtime, but I try to avoid this where possible.
>> Ultimately I may link against the vc6 dll as per neko.
>>
>> Hugh
>>
>>> Hugh Sanderson a écrit :
>>>> Hi all,
>>>>  I have updated the c++ backend to 0.2.  The main goal of this release
>>>> was to improve performance and settle on a basic structure for
>>>> the objects.
>>>>  I changed from using reference counting to using garbage collection
>>>> and got a big performance win (and it simplified things too).
>>>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>>>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>>>> and 8 fps for neko.
>>>
>>> Great work ;)
>>>
>>> Just a small question : what does hxcpp.dll contains ? 492 KB seems  
>>> big, are you sure it's not compiled as debug version ?
>>>
>>> Best,
>>> Nicolas
>>>
>>>
>>
>>
>>
>
>



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Nicolas Cannasse
Hugh Sanderson a écrit :
> In theory yes, and also if you did not need any external dlls (eg,
> nme.dll).

I agree that it's better to provide DLL's oriented code, and let people
that want single-file-apps to link all together statically ;)

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Laurent Kappler
In reply to this post by Nicolas Cannasse
What is hxcpp ??!!! want to know, looks awesome...:)))

L

Nicolas Cannasse a écrit :

> Hugh Sanderson a écrit :
>> Hi all,
>>
>> I have updated the c++ backend to 0.2.  The main goal of this release
>> was to improve performance and settle on a basic structure for
>> the objects.
>>
>> I changed from using reference counting to using garbage collection
>> and got a big performance win (and it simplified things too).
>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>> and 8 fps for neko.
>
> Great work ;)
>
> Just a small question : what does hxcpp.dll contains ? 492 KB seems
> big, are you sure it's not compiled as debug version ?
>
> Best,
> Nicolas
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Lee Sylvester
It's a target. Much like haXe can compile to SWF, JS, Neko or PHP, it
can now output C++ source code, complete with makefiles, too :-)

Lee




laurent wrote:

> What is hxcpp ??!!! want to know, looks awesome...:)))
>
> L
>
> Nicolas Cannasse a écrit :
>> Hugh Sanderson a écrit :
>>> Hi all,
>>>
>>> I have updated the c++ backend to 0.2.  The main goal of this release
>>> was to improve performance and settle on a basic structure for
>>> the objects.
>>>
>>> I changed from using reference counting to using garbage collection
>>> and got a big performance win (and it simplified things too).
>>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>>> and 8 fps for neko.
>>
>> Great work ;)
>>
>> Just a small question : what does hxcpp.dll contains ? 492 KB seems
>> big, are you sure it's not compiled as debug version ?
>>
>> Best,
>> Nicolas
>>
>>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Laurent Kappler
God name it! that's just a revolution running under our fingers.

L

Lee McColl Sylvester a écrit :

> It's a target. Much like haXe can compile to SWF, JS, Neko or PHP, it
> can now output C++ source code, complete with makefiles, too :-)
>
> Lee
>
>
>
>
> laurent wrote:
>> What is hxcpp ??!!! want to know, looks awesome...:)))
>>
>> L
>>
>> Nicolas Cannasse a écrit :
>>> Hugh Sanderson a écrit :
>>>> Hi all,
>>>>
>>>> I have updated the c++ backend to 0.2.  The main goal of this release
>>>> was to improve performance and settle on a basic structure for
>>>> the objects.
>>>>
>>>> I changed from using reference counting to using garbage collection
>>>> and got a big performance win (and it simplified things too).
>>>> For the Physaxe demo (pentagonal rain, opengl mode) performance
>>>> went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
>>>> and 8 fps for neko.
>>>
>>> Great work ;)
>>>
>>> Just a small question : what does hxcpp.dll contains ? 492 KB seems
>>> big, are you sure it's not compiled as debug version ?
>>>
>>> Best,
>>> Nicolas
>>>
>>>
>>
>>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Justin Donaldson
Ha ha... that's a great quote. :)


On Mon, Nov 10, 2008 at 10:34 AM, laurent <[hidden email]> wrote:
God name it! that's just a revolution running under our fingers.

L

Lee McColl Sylvester a écrit :

It's a target. Much like haXe can compile to SWF, JS, Neko or PHP, it can now output C++ source code, complete with makefiles, too :-)

Lee




laurent wrote:
What is hxcpp ??!!! want to know, looks awesome...:)))

L

Nicolas Cannasse a écrit :
Hugh Sanderson a écrit :
Hi all,

I have updated the c++ backend to 0.2.  The main goal of this release
was to improve performance and settle on a basic structure for
the objects.

I changed from using reference counting to using garbage collection
and got a big performance win (and it simplified things too).
For the Physaxe demo (pentagonal rain, opengl mode) performance
went from ~25 fps to ~82 fps.  This compares well to 35 fps for swf
and 8 fps for neko.

Great work ;)

Just a small question : what does hxcpp.dll contains ? 492 KB seems big, are you sure it's not compiled as debug version ?

Best,
Nicolas








--
haXe - an open source web programming language
http://haxe.org



--
Justin Donaldson
PhD Candidate, Informatics
Indiana University
http://www.scwn.net

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Laurent Kappler
Thanks, if I can add anything good to what's going on. I promess I will
release some code. ;)
Next targets : Java and processing ... challenging the genius.

Real congratulation!
L

the opengl demo is very fast!


Justin Donaldson a écrit :

> Ha ha... that's a great quote. :)
>
>
> On Mon, Nov 10, 2008 at 10:34 AM, laurent <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     God name it! that's just a revolution running under our fingers.
>
>     L
>
>     Lee McColl Sylvester a écrit :
>
>         It's a target. Much like haXe can compile to SWF, JS, Neko or
>         PHP, it can now output C++ source code, complete with
>         makefiles, too :-)
>
>         Lee
>
>
>
>
>         laurent wrote:
>
>             What is hxcpp ??!!! want to know, looks awesome...:)))
>
>             L
>
>             Nicolas Cannasse a écrit :
>
>                 Hugh Sanderson a écrit :
>
>                     Hi all,
>
>                     I have updated the c++ backend to 0.2.  The main
>                     goal of this release
>                     was to improve performance and settle on a basic
>                     structure for
>                     the objects.
>
>                     I changed from using reference counting to using
>                     garbage collection
>                     and got a big performance win (and it simplified
>                     things too).
>                     For the Physaxe demo (pentagonal rain, opengl
>                     mode) performance
>                     went from ~25 fps to ~82 fps.  This compares well
>                     to 35 fps for swf
>                     and 8 fps for neko.
>
>
>                 Great work ;)
>
>                 Just a small question : what does hxcpp.dll contains ?
>                 492 KB seems big, are you sure it's not compiled as
>                 debug version ?
>
>                 Best,
>                 Nicolas
>
>
>
>
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>
>
>
> --
> Justin Donaldson
> PhD Candidate, Informatics
> Indiana University
> http://www.scwn.net


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Tony Polinelli
Wow- you guys keep amazing me!

With the C++ target will this make it possible, at some point, to target console systems like the DS, wii, etc?  - presumably not the iPhone (ObjectiveC) - altho we'd love that target.

We develop games for flash atm - but would love to branch out in the future - would this be a way to please both worlds?



 

On Tue, Nov 11, 2008 at 4:08 AM, laurent <[hidden email]> wrote:
Thanks, if I can add anything good to what's going on. I promess I will release some code. ;)
Next targets : Java and processing ... challenging the genius.

Real congratulation!
L

the opengl demo is very fast!


Justin Donaldson a écrit :
Ha ha... that's a great quote. :)


On Mon, Nov 10, 2008 at 10:34 AM, laurent <[hidden email] <mailto:[hidden email]>> wrote:

   God name it! that's just a revolution running under our fingers.

   L

   Lee McColl Sylvester a écrit :

       It's a target. Much like haXe can compile to SWF, JS, Neko or
       PHP, it can now output C++ source code, complete with
       makefiles, too :-)

       Lee




       laurent wrote:

           What is hxcpp ??!!! want to know, looks awesome...:)))

           L

           Nicolas Cannasse a écrit :

               Hugh Sanderson a écrit :

                   Hi all,

                   I have updated the c++ backend to 0.2.  The main
                   goal of this release
                   was to improve performance and settle on a basic
                   structure for
                   the objects.

                   I changed from using reference counting to using
                   garbage collection
                   and got a big performance win (and it simplified
                   things too).
                   For the Physaxe demo (pentagonal rain, opengl
                   mode) performance
                   went from ~25 fps to ~82 fps.  This compares well
                   to 35 fps for swf
                   and 8 fps for neko.


               Great work ;)

               Just a small question : what does hxcpp.dll contains ?
               492 KB seems big, are you sure it's not compiled as
               debug version ?

               Best,
               Nicolas








   --    haXe - an open source web programming language
   http://haxe.org




--
Justin Donaldson
PhD Candidate, Informatics
Indiana University
http://www.scwn.net


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://www.touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: HXCPP version 0.2

Gamehaxe
Hi,
I think the C++ target is very close to c#, and close-ish to Java
(source, not bytecode). To use java with a similar structure, I think
the 1-element-array=reference may have to be expanded include results
 from return blocks.  Not too sure about Objective-C though.

One of the big things is also linking to existing libraries.
I think that would be trivial in Java (although some "extern" headers
would be required), And i think trivial also for .net (I have
not done very much .net yet).  I have not yet come up with
a very easy way of linking to external libraries for c++.
Currently it uses the neko api, which is not too bad and
has the big advantage of using existing code and producing
stuff that can be used with neko, but its not "native".

For objective-c/iphone you would need to start with a basic
library and then think about how a haxe API (whether neko, c++
or objective-c) would fit on top of that.

Apart from the native API, there is also the application API
that you layer on top of that.  For example, neash layers the
flash drawing api on top of the SDL native api.  This allows
you to nice cross-platform stuff from the one code base.
One possible solution here would be to port nme to the iphone
via an existing sdl port for the iphone (does one exist?)
I guess that's the dream, but I don't have an iphone or
a mac so I'm mostly speaking out of my    hat.

Hugh

> Wow- you guys keep amazing me!
>
> With the C++ target will this make it possible, at some point, to target
> console systems like the DS, wii, etc?  - presumably not the iPhone
> (ObjectiveC) - altho we'd love that target.
>
> We develop games for flash atm - but would love to branch out in the  
> future
> - would this be a way to please both worlds?
>
>
>
>
>
> On Tue, Nov 11, 2008 at 4:08 AM, laurent <[hidden email]>  
> wrote:
>
>> Thanks, if I can add anything good to what's going on. I promess I will
>> release some code. ;)
>> Next targets : Java and processing ... challenging the genius.
>>
>> Real congratulation!
>> L
>>
>> the opengl demo is very fast!
>>
>>
>> Justin Donaldson a écrit :
>>
>>> Ha ha... that's a great quote. :)
>>>
>>>
>>> On Mon, Nov 10, 2008 at 10:34 AM, laurent  
>>> <[hidden email]<mailto:
>>> [hidden email]>> wrote:
>>>
>>>    God name it! that's just a revolution running under our fingers.
>>>
>>>    L
>>>
>>>    Lee McColl Sylvester a écrit :
>>>
>>>        It's a target. Much like haXe can compile to SWF, JS, Neko or
>>>        PHP, it can now output C++ source code, complete with
>>>        makefiles, too :-)
>>>
>>>        Lee
>>>
>>>
>>>
>>>
>>>        laurent wrote:
>>>
>>>            What is hxcpp ??!!! want to know, looks awesome...:)))
>>>
>>>            L
>>>
>>>            Nicolas Cannasse a écrit :
>>>
>>>                Hugh Sanderson a écrit :
>>>
>>>                    Hi all,
>>>
>>>                    I have updated the c++ backend to 0.2.  The main
>>>                    goal of this release
>>>                    was to improve performance and settle on a basic
>>>                    structure for
>>>                    the objects.
>>>
>>>                    I changed from using reference counting to using
>>>                    garbage collection
>>>                    and got a big performance win (and it simplified
>>>                    things too).
>>>                    For the Physaxe demo (pentagonal rain, opengl
>>>                    mode) performance
>>>                    went from ~25 fps to ~82 fps.  This compares well
>>>                    to 35 fps for swf
>>>                    and 8 fps for neko.
>>>
>>>
>>>                Great work ;)
>>>
>>>                Just a small question : what does hxcpp.dll contains ?
>>>                492 KB seems big, are you sure it's not compiled as
>>>                debug version ?
>>>
>>>                Best,
>>>                Nicolas
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>    --    haXe - an open source web programming language
>>>    http://haxe.org
>>>
>>>
>>>
>>>
>>> --
>>> Justin Donaldson
>>> PhD Candidate, Informatics
>>> Indiana University
>>> http://www.scwn.net
>>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
>
>



--
haXe - an open source web programming language
http://haxe.org