开发者

is an alchemy C library faster/slower than an equivalent as3 library?

I've got a simple question. Suppose some simple lib written on c. Did I understood correctly that alchemy compiles it AS3 before compiling it to swf. If so, will the l开发者_JAVA技巧ib be slower or faster in comparison with the same lib written on AS3.


Alchemy use a modified actionscript compiler that allow the use of new operation who speed up memory access or allow sign extension to deal with C type.

It compile to SWF or SWC format but you have an option to see the as file genereated

Internally Alchemy emulate a processor (it seems to be an X86 proc) and have a library that replicate some of the core C lib such as Malloc, Free, etc...

So you will see a speed gain if your library use memory a lot but otherwise, as it compile to bytecode and emulate the C lib you can see a gain loss.

You will not see in the current state the same speed as your C code.


No, Alchemy does NOT compile to as3, it functions as a bridge to c/c++ code. So AS3 can utilize the functions written in C/C++ AND thus benefit from the high performance with a minimal degradation. So it will be just a really small fraction slower...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜