Live data from Hacker News

Golang vs. C# (.NET 5.0) at Benchmarks Game

benchmarksgame-team.pages.debian.net

101–110 of 114 posts

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#101
post #91

Earlier quoted context omitted.

What-about-ism. https://golang.org/doc/faq#garbage_collection > They’re all allowed to use bespoke pools and custom allocators. No. They are allowed a library memory pool. As-it-says: 'Please don't implement your own custom "arena" or "memory pool" or "free list" - they will not be accepted.' > … while Go’s allocator is slower… So that tiny tiny program shows it's slower because it's slower.

> What-about-ism. Not sure what you're referring to here. > No. They are allowed a library memory pool. Yes, this is a contrived rule. In reality, a Go developer would write the extra ~dozen lines (all of the heavy lifting done by the builtin slice implementation) and call it a day. > So that tiny tiny program shows it's slower because it's slower. Tautology. It's slower because the contrived rules preclude idiomatic…

> … a Go developer would write the extra ~dozen lines…

And a C# developer could write a program that would avoid GC, and a Java developer…, and…

It feels like you're hell-bent on using this thread for your personal programming language holy war…

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#102
post #97

Earlier quoted context omitted.

1. Which program? 2. Again, not limited to only one language. You are allowed an opinion about what is or is not compelling. 3. As before.

1. btree; see the Rust version which uses a bump allocator for example 2. Doesn't matter whether it's exactly one language. > You are allowed an opinion about what is or is not compelling. It's not a matter of opinion. The definitional purpose of benchmarks is to indicate something about reality; if you contrive rules that cause the benchmarks to deviate from reality, they lose their utility as benchmarks. I've demon…

1. bumpalo: Star 586, Fork 52 — a library, not implement your own custom allocator.

2. You have repeatedly claimed "only for one language".

> I think we can say as a matter of fact…

Apparently that is your opinion.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#103
post #102

Earlier quoted context omitted.

1. btree; see the Rust version which uses a bump allocator for example 2. Doesn't matter whether it's exactly one language. > You are allowed an opinion about what is or is not compelling. It's not a matter of opinion. The definitional purpose of benchmarks is to indicate something about reality; if you contrive rules that cause the benchmarks to deviate from reality, they lose their utility as benchmarks. I've demon…

1. bumpalo: Star 586, Fork 52 — a library, not implement your own custom allocator . 2. You have repeatedly claimed "only for one language". > I think we can say as a matter of fact… Apparently that is your opinion.

1. See all of the other arguments in this thread about "contrived rules"

> You have repeatedly claimed "only for one language".

How many languages are in practice prevented from using pre-allocation? How big is the cohort? Does it matter if it's exactly one or if it's two or three? Why are you fixating on this relatively irrelevant point rather than the more substantial point that has been reiterated a dozen times?

> Apparently that is your opinion.

In the same sense that "the sky is blue" is merely my opinion.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#104
post #99

Earlier quoted context omitted.

And these rules are particularly bizarre. Rust, C, and C++ are all allowed to use custom allocators while Java and C# have GCs which are optimized for this particular micro benchmark but not for real world applications (although I hear Java’s GCs are making good headway on latency lately, and clearly all of the GCs are suitable for general application development). So it’s really just Go which is forbidden from an id…

> … allowed to use custom allocators… No. They are allowed a library memory pool. As-it-says: 'Please don't implement your own custom "arena" or "memory pool" or "free list" - they will not be accepted.'

See "contrived rules" conversations elsewhere.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#105
post #101

Earlier quoted context omitted.

> What-about-ism. Not sure what you're referring to here. > No. They are allowed a library memory pool. Yes, this is a contrived rule. In reality, a Go developer would write the extra ~dozen lines (all of the heavy lifting done by the builtin slice implementation) and call it a day. > So that tiny tiny program shows it's slower because it's slower. Tautology. It's slower because the contrived rules preclude idiomatic…

> … a Go developer would write the extra ~dozen lines… And a C# developer could write a program that would avoid GC, and a Java developer…, and… It feels like you're hell-bent on using this thread for your personal programming language holy war…

> And a C# developer could write a program that would avoid GC, and a Java developer…, and…

Are those idiomatic? If so, then they should be permitted to apply those optimizations. Again, the whole point of benchmarks is to indicate real-world use.

> It feels like you're hell-bent on using this thread for your personal programming language holy war…

I've reiterated my substantial point over and over again ("contrived rules don't indicate real world use, which is the definitional purpose of benchmarks") and you still haven't addressed it. But in any case, perhaps if both of us think the other is waging a holy war, it's an indicator that the thread has run its course.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#107
post #22

Earlier quoted context omitted.

nah he just compares two different things. basically his golang hello world probably had basically nothing while his dotnet version used the "Microsoft.NET.Sdk.Web" which basically pulls the shared framework which will load a ton of stuff. BUT even after that the memory usage might be bigger. however does it really matter? I mean dotnet is not a big memory hog. it's pretty lightweight for what it is. compare it to ja…

I tried to do the most minimal, idiomatic design for both. I didn't save the C# code (I think it probably was just asp.net core and newtonsoft.json), but here is the go version [1]. It basically just loads a JSON file into memory then allows you to query the data with 2 API endpoints. [1] - https://github.com/J-Swift/GamesDbMirror-go

well asp.net core is not really minimal or idomatic. it pulls a whole framework your code doesn't do a lot of things that asp.net core would do. sadly since nancyfx died there arent that many c# http framework that are as lightweight as the golang once. asp.net core is more like java spring btw. nowdays most c# http frameworks do call `` which is really really big compared to just Microsoft.NETCore.App most often the defaut aspnetcore also configures a "secure" application (working cors, etc.)

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#108
post #102

Earlier quoted context omitted.

1. bumpalo: Star 586, Fork 52 — a library, not implement your own custom allocator . 2. You have repeatedly claimed "only for one language". > I think we can say as a matter of fact… Apparently that is your opinion.

1. See all of the other arguments in this thread about "contrived rules" > You have repeatedly claimed "only for one language". How many languages are in practice prevented from using pre-allocation? How big is the cohort? Does it matter if it's exactly one or if it's two or three? Why are you fixating on this relatively irrelevant point rather than the more substantial point that has been reiterated a dozen times? >…

> How many languages are in practice prevented from using pre-allocation?

How many provide GC?

The substantial point is that you wish special treatment for Go lang.

> … "the sky is blue" is merely my opinion…

When all can see the vibrant orange red sunset.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#109
post #77

Earlier quoted context omitted.

> I've never understood why… Perhaps they don't read the website text? > … no contact nor link… Search works.

I ran multiple search queries. I wouldn't be so dumb to post a comment like this here without having done my homework. The best I found after trying numerous keyword permutations was https://salsa.debian.org/benchmarksgame-team/benchmarksgame , but this did not appear to contain all of the benchmarks' source, just the source embedded in HTML, which is specious at best. This repository looks mostly like frontend HTML…

> This repository looks mostly like frontend HTML…

It is mostly frontend HTML — the benchmarks game project deliverable is a (now static) website.

> I couldn't realistically re-run some of the example benchmarks from the source embedded in the HTML, because…

People have taken the simplest thing that will work approach: select/copy the program source code from the website, paste into a text editor and save; then build & run adapting the commands shown on every program page.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#110

Earlier quoted context omitted.

Microsoft created .NET and Azure and a lot of the tooling so the integration is tight, now that it's multi platform and with Rider (multiplatform .NET IDE) being as good as if not better than Visual Studio there is nothing stopping it.

Azure integration is not that great actually. For example .NET 5 support for Azure Functions is a huge breaking change with random issues, missing features and terrible IDE support (you have to launch it through CLI and attach to a PID printed out by the host process to debug a function, you could just debug 3.1 functions) - it's beta quality. I find this a common theme with Azure support and .NET

Azure functions are one small part of Azure. Im talking about Azure Dev ops for example which is deeply integrated in the tooling. Including source control/product backlogs/pipelines/testing etc.
Post reply on HN