News for hackers. Stuff that matters.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Sunday November 21, 2021 @07:47AM (#29295950)
> And anyway 99% of the time you're gonna be slow because the sack of meat writing the program screwed up some aspect of the system design or the code. Unless

Or in my experience, most of the time a service's latency is dominated by out-of-process calls, e.g. the time taken to talk to other services over http, or to retrieve data from a data store. Speeding up the runtime is welcome, but even a massive 40% speedup of something that constitutes 10% of your total latency is ... closer to a 4% reduction in latency. Design matters more.

Re:.NET 6 vs .NET 5 speedup by emteycz on Sunday November 21, 2021 @12:28PM (#29297979)
If your program is slow because it's waiting for external service response, you're doing programming wrong. Your program should do other work in the meantime. I guess you're already doing that, but if so, doesn't that invalidate your reply here?
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Sunday November 21, 2021 @02:00PM (#29298740)
> you're doing programming wrong. Your program should do other work in the meantime.

It's not always true that there is other work to do in the meantime. In fact in my experience, it seldom is. "you're doing programming wrong" is a very strong statement, and not one that I take seriously in this context.

Typically you "await" the external service response, so that it is not using a thread to do that, and "other work" in the form of starting to deal with other requests can happen in the meantime, thereby increasing service throughput.

But that won't speed up a given request - you can wait for an external service more efficiently, but you can't wait faster.

Services that do not depend on any other http services or any data store do happen, but they are rare in my experience (calculation engines, I suppose). So for almost every service, when thinking about response time, you have to, first and foremost, think about the latency of the data stores or upstream services.

Re:.NET 6 vs .NET 5 speedup by emteycz on Sunday November 21, 2021 @02:57PM (#29299168)
That is all true, but in the context of .NET performance, it's not relevant.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Sunday November 21, 2021 @09:31PM (#29302076)
What then is, in your opinion, most relevant?
Re:.NET 6 vs .NET 5 speedup by emteycz on Monday November 22, 2021 @03:58AM (#29304312)
Time taken by processing done by the application itself. Faster processing is good even if your backend is mostly waiting for other services - now it can wait for more services at the same time and deal with their output faster, allowing your app to use less resources or handle more traffic. That is especially pronounced on scale - if you're spending X million for computing time a month, reducing it by few percent is very interesting to you.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Monday November 22, 2021 @09:04AM (#29306364)
Both can be relevant. In the real world, designing how to deal with dependencies and data stores is clearly relevant, as it can be the largest large part of the time taken to respond to a given request. It would be a design error to ignore it.
Re:.NET 6 vs .NET 5 speedup by emteycz on Tuesday November 23, 2021 @05:21AM (#29316265)
Yes, but external services are irrelevant to performance of . NET.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Tuesday November 23, 2021 @09:07AM (#29317941)
If your job is to make performant services, in .NET (or in any similar language) external services are 100% relevant to your job.

If You want to be pedantic - and you most certainly do - then only .NET performance itself is relevant to performance of . NET itself, that's a truism, as defined.

But this narrow focus is not useful - if you want to do the job, then you have to think a bit more widely, and understand what the real problem is.

Re:.NET 6 vs .NET 5 speedup by emteycz on Tuesday November 23, 2021 @02:17PM (#29321994)
Sorry but this is not pedantic at all. You're saying performance speedup is irrelevant because most time is spent waiting for external services... But that is simply not true if you're beyond just a few servers. Output of external services needs to be processed and having faster software means less resource is spent per request, thus more requests can be served for the same resources. That is very important.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Thursday November 25, 2021 @04:23PM (#29345120)
> You're saying performance speedup is irrelevant

I am not saying that; you are oversimplifying into a straw man. great-grand-parent comment is where I literally put a non-zero number to how relevant language perf improvement was: https://news.ycombinator.com/item?id=29295950 and later on "Both can be relevant"; which all contradict your characterisation.

The only person who said above "it's not relevant" is you, and you also said "external services are irrelevant" - You're projecting the "it's irrelevant" statement onto me here.

But the design considerations of how and when to use external services very definitely are relevant to service latency, contrary to what you say, for reasons given multiple times above. Your current odd comments are not fact-based or interesting, so I don't think that you have anything more to add to this discussion at all.

Re:.NET 6 vs .NET 5 speedup by DeathArrow on Sunday November 21, 2021 @03:10PM (#29299263)
>If your program is slow because it's waiting for external service response, you're doing programming wrong. Your program should do other work in the meantime.

What work? Mine bitcoins while you wait the result for an API call?

Re:.NET 6 vs .NET 5 speedup by emteycz on Sunday November 21, 2021 @03:43PM (#29299513)
Usually processing other requests
Re:.NET 6 vs .NET 5 speedup by atraac on Sunday November 21, 2021 @04:56PM (#29300147)
I think any sane person here assumes any IO, especially in .NET is already async and allows other requests to use that time… Most web apps are still IO constrained.
Re:.NET 6 vs .NET 5 speedup by emteycz on Monday November 22, 2021 @03:58AM (#29304313)
Sure, but how is waiting for external requests relevant in any way to .NET performance then?
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Monday November 22, 2021 @08:46AM (#29306220)
If you're asking "how is waiting for external requests relevant to my service's response time" the answer is "because it's usually the largest part". I really don't know how to explain it more simply than that.

If you need to improve this, and that code is .NET, then the solution is a different design, also in .NET Code.

Re:.NET 6 vs .NET 5 speedup by emteycz on Tuesday November 23, 2021 @02:06AM (#29315321)
I am asking how is waiting for external services relevant to .NET processing time.
Re:.NET 6 vs .NET 5 speedup by SideburnsOfDoom on Thursday November 25, 2021 @04:48PM (#29345290)
I refer you to my answer above. https://news.ycombinator.com/item?id=29306220