News for hackers. Stuff that matters.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by geocar on Saturday December 31, 2016 @03:31AM (#13290150)
> An "offline" compiler can't use things like the type information gathered at runtime.

This isn't true. At run-time you only need to pay the cost of dispatching once per (type of) input variable.

C++-style templates are popular enough that this concept should be readily understood by now: You pay with heavy compile times (IIRC Crystal takes almost a GB of ram to compile its compiler).

> Benchmarks should be provided before making performance claims!

Yes, absolutely. And reproducible.

Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by munificent on Monday January 02, 2017 @08:52PM (#13306046)
> At run-time you only need to pay the cost of dispatching once per (type of) input variable.

That also means you can't inline (potentially) polymorphic calls. Inlining is the great big hammer when it comes to optimization.