Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> AOT compiled languages like C# will run slower on lambda than pre-compiled on an EC2. You shouldn't need benchmarks to work that much out - it's software development 101. However (if) you then went on to compare JIT compiled languages on lambda vs EC2 you'd notice the performance is much closer to each other.

But that is what the author did. C# is not 'fully' AOT, it is JITed into MSIL on .net CLR, at least under normal circumstances. Does elastic beanstalk use .net native style binaries somehow?



I'm getting heavily downvoted for the C# point when benchmarks do demonstrate that C# does have a measurably slower cold start time than many other language runtimes; in fact slower than every JIT language. So I'm not actually wrong on that point.

> But that is what the author did. C# is not 'fully' AOT, it is JITed into MSIL on .net CLR, at least under normal circumstances. Does elastic beanstalk use .net native style binaries somehow?

He's running .NET on EC2, so no cold start times. Elastic Beanstalk is "just" another orchestration layer (and not a good one in my personal opinion but I can see why it might appeal to some people).


This is no secret. C# and Java are slower with lambda than scripting languages like Python and Javascript. Whether it’s slower overall, I haven’t seen benchmarks and outside of lambda, the startup time cost is usually negligible.


Slower overall very much depends on your workload and the way the code is written. However lambda is supposed to be short lived processes and AWS manage the concurrency so the actual performance difference of each language is mitigated somewhat for the average customer (edge cases will always exist).

It's also worth noting that if you're running the kind of processes that this does become a concern, then lambda is probably the wrong choice anyway. However, as always, the smart thing to do is build then benchmark (as the author did).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: