Re: Haxe Digest, Vol 54, Issue 3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Haxe Digest, Vol 54, Issue 3

James W. Hofmann
Quoting [hidden email]:

>
> The test for Std.int is flawed, you are assigning Std.int to a toInt
> variable and then using that instead, then the compiler cant inline the
> Std.int body. Function calls are slow, Std.int isnt, Std.int usually
> translates to a single toInt opcode in the AVM2 bytecode.
>

Thank you for pointing that out - somehow I had got the idea that  
Std.int was not inlined. Mistakes like that are why I posted it in  
public - even just preparing it for posting made me double-check and  
discover that I had actually run the same benchmark with different  
titles in a few cases :P

I'll update the wiki page with the correction.

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