4 ms·
This is pretty remarkable and surprising that it's only 5-15% slower. The Go compiler isn't very aggressive about optimizing even ignoring GC overhead concerns.
by throwaway894345 6y ago
This is pretty remarkable and surprising that it's only 5-15% slower. The Go compiler isn't very aggressive about optimizing even ignoring GC overhead concerns. I'm also curious to understand better how they bootstrapped the dynamic memory and scheduling facilities since Go obviously relies on an underlying operating system for these things.
- jolux 6y agoI believe the Midori project at Microsoft found similar in trying to write an OS in C#.
- deleted 6y ago[deleted]
- jen20 6y agoSeveral posts from Joe Duffy, who led that project, are at [1]. [1]: http://joeduffyblog.com/2015/11/03/blogging-about-midori/ http://joeduffyblog.com/2015/11/03/blogging-about-midori/
- HonshinM 6y agoiirc they modified Go runtime
- pjmlp 6y agoObviously, usually a language runtime expects an underlying OS. When one isn't available, the runtime plays the role of an OS, and much be adapted as such.
- londons_explore 6y agoIt's because typically for most applications the OS isn't very much overhead. If the kernel was only using 1% of the CPU time before, and you rewrite it in QBASIC for a 5x slowdown, your application only sees a ~4% slowdown...
- sitkack 6y agoBut didn't you just explain why our kernels should be in QBASIC? Or any other safe language? I feel like this is the next version of Christmas not being true. That unsafe languages were a dumb scam.
- jolux 6y agoMost of it comes from a few bad decisions in C in particular that we ended up with stuck for a very long time (nulls, badly designed array type) OSes were written to run on very different hardware from what we use now and over time the hardware was adapted to running specifically C code well. High-level languages like we expect these days hardly existed at all before the mid 90s or so, and they have been gaining in dominance ever since.
- pjmlp 6y agoYou will notice that Go shares some authors with C. They did the same with C back in the day, versus what was being done in systems programming since the 60's. The language C builds on, B, is a spin off of BCPL, a language designed to Bootstrap CPL. Thanks to UNIX's success we ended up with a language whose original purpose was to bootstrap compilers, not to be a full stack programming language. Here, systems programming in 1961, 10 years before C was born, still being sold by Unisys. https://en.wikipedia.org/wiki/Burroughs_large_systems https://en.wikipedia.org/wiki/Burroughs_large_systems Or at US military, https://en.wikipedia.org/wiki/JOVIAL https://en.wikipedia.org/wiki/JOVIAL Or during the 70's, https://en.wikipedia.org/wiki/PL/8 https://en.wikipedia.org/wiki/PL/8 https://www.computerhistory.org/revolution/input-output/14/347 https://www.computerhistory.org/revolution/input-output/14/3... https://en.wikipedia.org/wiki/Interlisp https://en.wikipedia.org/wiki/Interlisp https://en.wikipedia.org/wiki/BLISS https://en.wikipedia.org/wiki/BLISS https://en.wikipedia.org/wiki/Modula-2 https://en.wikipedia.org/wiki/Modula-2 https://en.wikipedia.org/wiki/Modula-2%2B https://en.wikipedia.org/wiki/Modula-2%2B Remember that project Bell Labs stepped away from, which gave C's authors plenty of free time? https://en.wikipedia.org/wiki/PL/I https://en.wikipedia.org/wiki/PL/I https://multicians.org/myths.html https://multicians.org/myths.html "Thirty Years Later: Lessons from the Multics Security Evaluation" https://hack.org/mc/texts/classic-multics.pdf https://hack.org/mc/texts/classic-multics.pdf