4 ms·
I don’t think this is a property of dynamic languages. This groovy example is almost certainly the best case for the JVM (arithmetic, few allocations or polymor
by weberc2 8y ago
I don’t think this is a property of dynamic languages. This groovy example is almost certainly the best case for the JVM (arithmetic, few allocations or polymorphism, etc). In other words, probably not taking advantage of the dynamism.
Dynamic languages can be fast by being well designed and simple (Wren) or highly optimized (JS) or both (LuaJIT). There’s also the experimental GraalVM, but this is definitely the exception and not the rule.
Writing performant C++ is actually not hard if you have rudimentary C++ knowledge. That said, rudimentary C++ knowledge is a lot more expensive than rudimentary knowledge of other languages. But the options aren’t just dynamic languages vs C++; there’s a ton of middle ground with VM languages like Java and C# and native languages like Go. The first two aren’t much harder than dynamic languages and I find Go easier than any dynamic language I’ve used to date (I’m a professional python developer). But all of these languages are on the order of half of C’s performance and 100X the speed of CPython or Ruby and 10X of JS.
- pjmlp 8y ago> VM languages like Java and C# and native languages like Go. Oh well this VM meme is getting old, https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc https://www.excelsiorjet.com/ https://www.excelsiorjet.com/ https://docs.microsoft.com/en-us/dotnet/framework/net-native/getting-started-with-net-native https://docs.microsoft.com/en-us/dotnet/framework/net-native... https://docs.microsoft.com/en-us/xamarin/mac/internals/aot https://docs.microsoft.com/en-us/xamarin/mac/internals/aot https://docs.unity3d.com/Manual/IL2CPP-HowItWorks.html https://docs.unity3d.com/Manual/IL2CPP-HowItWorks.html
- weberc2 8y agoI don’t think I’m following your point. That C# isn’t a VM language because there exist AOT compilers? That’s fine; my point is unrelated to the VM/interpreter/AOT taxonomy—just that dynamic languages aren’t particularly performant. I’m happy to concede the “C# is/isn’t a VM (even though 99% of production deployments are VMs)” point if it matters to you.