Actionscript doesn't execute at native speeds.
One option is to call a native process.
Right... I'm using AIR just to call native process to calculate SHA... doesn't make any sense and I lose cross-platform. I know actionscript does not execute as quick as native. The question is, why is the difference so huge and if there's anything I can do to speed it up. The implementation made by Adobe seems to be fairly optimized, no function calls, everything inline, bitwise operations. Yet, it's still way to slow for this kind of usage. I understand someone might say "well don't use flex then". but the point is to actually use it.
There is very little optimization of the instructions in the Actionscript
compilers and runtime. There may be some layers around file i/o as well for
platform isolation and security. The dynamic nature of the language
sometimes gets in the way of optimizations.
There's a whole team of folks trying to make Actionscript execute faster.
Right now, you have to make some tradeoffs of cross-platform vs performance.
As I said, I don't mind the tradeoff, I am however concerned with how inferior the performance actually is compared to native speeds.
For reference, what I did in the end was compiling some part of openssl into alchemy code. That yielded good results.