News for hackers. Stuff that matters.
Re:Guide to Java Virtual Threads by cyberax on Thursday March 16, 2023 @07:22AM (#35180551)
Hm. I know this from my personal work, replacing Go code with an async/await code.

There's a bunch of benchmarks that compare C# async/await and Goroutines (e.g. https://alexyakunin.medium.com/go-vs-c-part-1-goroutines-vs-... ). Go still wins there, but they all miss the very important case of nested async/awaits.

These microbenchmarks also focus on looking at Go channels versus other synchronization methods, which in my experience is not that relevant (Go channels just suck).

I guess I'll need to write a blog post.

Re:Guide to Java Virtual Threads by DeathArrow on Thursday March 16, 2023 @03:00PM (#35186685)
Those benchmarks are really old, things can change quite fast when it comes to programming language implementations.
Re:Guide to Java Virtual Threads by cyberax on Thursday March 16, 2023 @08:20PM (#35190920)
I wrote a quick-and-dirty benchmark: https://blog.alex.net/benchmarking-go-and-c-async-await

Results: Go - 32ms, C# - 494ms. The difference also becomes bigger as you add more recursion levels.