News for hackers. Stuff that matters.
Re:Haxe 2.10 - Now with Java and C# targets by bodyfour on Monday July 16, 2012 @11:39PM (#4253958)
> it's my understanding that producing bytecode is as easy as--if not vastly easier than--producing code in another language

Maybe true for unoptimized code. However, Java and C# compilers have received years of work to make efficient use of their respective VMs; standing on their shoulders makes some sense.

Re:Haxe 2.10 - Now with Java and C# targets by MichaelGG on Tuesday July 17, 2012 @12:01AM (#4254016)
Really? What kind of optimizations does the C# compiler do when emitting IL? As far as I know, they are fairly straightfoward optimizations - there's nothing really that complex going on there. The C# team has said they aim for a straightfoward mapping to IL.

You won't see the C# compiler inlining functions (even though the CLR does _way_ better with large functions and doesn't handle inlining well). It won't propagate constant expressions. You won't see it transforming recursive functions into loops. Does it even remove unused variables?

All the optimizations that C# really relies on for performance are handled by the JIT, and any compiler following the same patterns will get the same enhancements, plus the ability to emit better IL than C#.

That said, I'm still unconvinced it's easier to emit MSIL than C#, and I'm rather well versed with MSIL.

Re:Haxe 2.10 - Now with Java and C# targets by mccoyst on Tuesday July 17, 2012 @08:59AM (#4255470)
Maybe things are different on Dalvik, but javac for the Oracle JVM is about as braindead as a java compiler can get; all of the optimizing is done during JIT.