Go ask this comment, because I'm continuing their comparison: https://news.ycombinator.com/item?id=48125795
> In that case it's apple and oranges, one would be for interprocess communication and one wouldn't.
The whole point of the complaint was wtallis claiming the inter-process-capable lock was being used for locks that don't need it! That's the foundation of this conversation!
> What are you basing this on?
Basic coding knowledge and an assumption of competency. There's no good reason for it to slow down more than that when it's used the same way. If you have a reason go ahead and tell me.
> Again, latency isn't about how many times something is called per second. That would matter for throughput.
I addressed both.
The extra latency for using an overly capable lock should be negligible. That's not the problem anyone is worried about.
This is just saying "I just know", but what specific function and basic timings are you going off of? If you don't know, why are you so sure of the numbers?
The whole point of the complaint was wtallis claiming the inter-process-capable lock was being used for locks that don't need it! That's the foundation of this conversation!
They were saying it's rare to need IPC lock for video games and I don't think that's true, then I gave a scenario where you would use one.
But whatever, let's focus on the actual point:
> They were saying it's rare to need IPC lock for video games and I don't think that's true, then I gave a scenario where you would use one.
And I was pointing out that a voice IPC lock is still "rare" when we use the most appropriate definition of "rare" for this context. In this context of worrying that using the wrong kind of lock will slow the game down, how often we're using the lock matters. If we go 50 million CPU cycles between uses, it's "rare".
No, latency is what matters.
And I was pointing out that a voice IPC lock is still "rare" when we use the most appropriate definition of "rare"
This isn't really a point with explanation, it's just you saying 'nu uh', even though that was just a single example.
There's no reason for an upgraded lock to significantly change in latency. That's not what they were worried about when criticizing the idea of using the former lock as the main lock type in a game. Your most used locks need throughput.
So no, latency is not what matters. And I've explained why I say that in multiple ways, while you haven't given any explanation for why you're focusing on latency.
When they asked "how often" in the middle of that criticism, they're not looking for an example that sprinkles in a couple calls, they're looking for something that puts serious load onto the lock. Any answer that is once per frame or less is not properly addressing the question.
No you haven't, you keep talking about doing something 100 times, but if you have a lock between processes, getting those processes to wake up and know the unlock happened with low latency is what matters. After the unlock whatever happens is going to be fast anyway, which in IPC is probably going to be copying memory.
What specific function call are you thinking of that would have high overhead but not latency and the latency wouldn't matter?
you originally responded to
I replied to someone saying "how often do you use a shared lock in games" and I said there are obvious uses.
That has not been part of all my explanations. But just so I can make it as clear as possible I will now explain it again without mentioning how many times it's called anywhere in the rest of my comment:
> if you have a lock between processes, getting those processes to wake up and know the unlock happened with low latency is what matters
Whether it matters depends on what you're benchmarking.
When the alternative to IPC is waking up another thread, your latency should be about the same either way. It's not what they were trying to compare.
The core comparison they wanted to make was about the simplicity of using a single lock type versus the overhead of using an IPC-capable lock everywhere. A better way to phrase their actual question is about how deep those IPC needs go in contrast to their downsides, not just whether there's a single call site somewhere.
> I replied to someone saying "how often do you use a shared lock in games" and I said there are obvious uses.
You gave a perfectly good answer to the half a sentence you quoted, if that half sentence was in a vacuum. But it was not in a vacuum, and your answer was not good for what they were actually asking.
Good, because that's what I meant to do, which is why that's what I quoted.
why did you argue with me???
You replied to me.
You did not answer the question they asked. You answered what would have been a reasonable interpretation of half of their sentence, if there hadn't been more text directly around it.
> You replied to me.
I did.
But if you were purposefully isolating half their sentence, there was no reason for you to argue with that reply. The way you argued implies you weren't doing that on purpose, and thought you were answering their actual question.
They did ask it because I quoted it and replied. That's how these forums work. People write text and other people reply to it.
The way you argued implies you weren't doing that on purpose, and thought you were answering their actual question.
No, that's not true, I think you made all that up.
No, you quoted half a sentence. That wasn't the whole question. You didn't answer the actual question.
The fact that you're still insisting you answered the question makes it clear why you argued with me when I was just clarifying things. You didn't answer something different on purpose, you're still stubbornly acting like you answered the right thing.
You did not answer their actual question. Period. I'm leaving now.
They asked two questions and I answered one. You hallucinated timings to imaginary functions you couldn't name.
Period. I'm leaving now.
You inserted yourself and had a meltdown. I don't know why this was so upsetting but you couldn't actually give a single technical detail, it was just "I just know" and "ask them what function I'm talking about".
And you were just as stubborn/'meltdown' when repeatedly insisting it was about latency. They never mentioned latency.
No it wasn't (I think you meant rhetorical). They might just have not expected a reply.
And you were just as stubborn/'meltdown'
I didn't reply to you.
when repeatedly insisting it was about latency. They never mentioned latency.
I mentioned it once you mentioned overhead, because that's what is actually important between processes.
I don't mean rhetorical. I mean abstract in that it wasn't about specific locks, it was about types of lock. That's why I didn't try to name any particular functions.
> I didn't reply to you.
In your future replies to me.
If you're not talking about later replies... are you implying you were calling my first comment a meltdown? Weird.
> I mentioned it once you mentioned overhead, because that's what is actually important between processes.
The main worry expressed in the original post was about the throughput of using an IPC lock in places that don't need an IPC lock. That's the overhead I was talking about.
That's what I answered.
are you implying you were calling my first comment a meltdown? Weird.
Trying to make things up that never happened?