Search code examples
actionscript-3adobealchemy

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 lib be slower or faster in comparison with the same lib written on AS3.


Solution

  • 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.