Live data from Hacker News

A single line to 3 cashiers is ~3x faster than a separate line for each cashier

online.wsj.com

101–110 of 172 posts

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#101
post #50

Earlier quoted context omitted.

> Why needlessly set CPU affinity There are practical reasons to do that. That is common in realtime systems. Trying to isolate the cpu for a particular process. So that is available faster when that process needs it. You could also have n-realtime processes. You don't want them competing for the same CPU if you know ahead of time you can allocate a CPU for each one of them. Another reason is caching. For example you…

CPU affinity certainly has a useful purpose; however, I said "needlessly". As in, what if every process on your system selected a CPU when it started, and just waited for that CPU, to the point of leaving other CPUs idle or underutilized? And what happens when you get stuck behind a process which requires a huge pile of CPU resources? The problem becomes even worse with batch processing: every process must run to com…

In a typical real-time system you don't have to deal with random processes screwing things up. Resources are meticulously allocated to individual tasks, and the tasks aren't allowed to randomly grab resources in the scenario you describe. It all has to be planned out in advance.

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#103
post #43

Earlier quoted context omitted.

Not trying to be condescending but doesn't it surprise anyone here that this is _not_ obvious? At least on this site, there are still people doubting or debating this. So I am wondering why don't stores do this already. And I believe it is because of perceptions. They understand that time will be saved, however, they realize that most people will be scared by a long line. One long line that moves fast will still appe…

It's another instance of "people are stupid". Yes, for any educated person it's obvious that one line is faster, that's the first thing about queueing theory, but most people don't know the first thing about queueing theory. Other instances of "people are stupid" leading to poor design: * Some cars come with a CVT (continuously variable transmission) rather than having to shift gears. The audible pitch of the engine…

A university lecturer of mine actually interviewed people in a bank, and asked them how long they thought they had stood in line. She found it was proportional to the line length, not the time they actually stood in line. Note, the bank didn't believe her, so she used some modelling package to animate it ... then they believed her.

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#104
post #90
post #79

scala> import org.apache.commons.math.distribution.{ExponentialDistributionImpl=>expo} //pc = process customer, with a mean time mu per customer scala> def pc(mu:Int):Double= new expo(mu).sample // q = queue of n customers with mean process time mu scala> def q(n:Int,mu:Int):Double=(1 to n).map(_=>pc(mu)).sum scala> // put 3000 people in 1 queue with mean process time 50 scala> (1 to 1000).map(_=>q(3000,50)).sum/1000…

But of course this is BS, because the three queues are not independent. Try it with 1 queue which feeds into whichever of the three queues is currently shortest. And of course, in grocery stores, where one can unload one's cart while the person ahead is being processed, there's an advantage to multiple lines.

>Try it with 1 queue which feeds into whichever of the three queues is currently shortest

I have edited my original response to include that scenario as well. btw for M/M/1 vs M/M/3, here's a good reference: http://people.brunel.ac.uk/~mastjjb/jeb/or/queue.html

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#105

Earlier quoted context omitted.

Sure, if the line perfectly rebalances then three lines is almost identical to the single line. BUT as I'm sure you know, it's sometimes hard to know when to move. Is it after you've waited one minute, then hop to the back of another line? Let me give you a concrete example: Imagine you enter a line with 15 people in it. Your line moves 14 people through perfectly. You're next, but the guy in front of you takes longe…

To add to your examples, there's also the case that you've already unloaded your cart, but the idiot in front of you sends the cashier on a wild goose chase to get cigarettes for him and they spend ten minutes sorting that out. Or you're behind some "extreme couponer" who splits their order into six separate orders to maximize their coupon savings, and you have to resist the urge to just pay for their entire order ju…

And then you CAN'T leave the slow line because there are people boxing you in from behind, even though you chose this line because the guy ahead of you had only one item... until he decided to make the cashier search the entire store to make sure they were actually out of his favorite cigarettes.

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#106
post #85

Earlier quoted context omitted.

Self-checkouts are not just about speed. They also appeal to specific kind of people. I use them because I don't want to interact with someone just to get some groceries. I know, it's kind of sad, but I don't want to say 'Hi' and 'Thank you' and I don't want 5 bags when 2 would suffice and don't want to explain that, so I just do it myself.

You must be very popular at parties. (Let the downvoting begin)

Downvote for what? Bad character?

To design is shop is not about math or throughput, it's all about psychology. You don't want lines to move fast, you just want them to appear like moving fast.

My point is merely that self-checkout is not only about speed, it's about personal comfort too.

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#108
post #90
post #79

scala> import org.apache.commons.math.distribution.{ExponentialDistributionImpl=>expo} //pc = process customer, with a mean time mu per customer scala> def pc(mu:Int):Double= new expo(mu).sample // q = queue of n customers with mean process time mu scala> def q(n:Int,mu:Int):Double=(1 to n).map(_=>pc(mu)).sum scala> // put 3000 people in 1 queue with mean process time 50 scala> (1 to 1000).map(_=>q(3000,50)).sum/1000…

But of course this is BS, because the three queues are not independent. Try it with 1 queue which feeds into whichever of the three queues is currently shortest. And of course, in grocery stores, where one can unload one's cart while the person ahead is being processed, there's an advantage to multiple lines.

Isn't this essentially equivalent to having a single queue though... except now you have a kind of cache at each register holding a small number of customers?

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#109
post #43
post #27

FYI: This is an example of the branch of mathematics called queueing theory. http://en.wikipedia.org/wiki/Queueing_theory It's a fascinating study requiring a good knowledge of probability to use beyond the simplified models. It turns out from the math that throughput using a single queue is better than using multiple queues.

Not trying to be condescending but doesn't it surprise anyone here that this is _not_ obvious? At least on this site, there are still people doubting or debating this. So I am wondering why don't stores do this already. And I believe it is because of perceptions. They understand that time will be saved, however, they realize that most people will be scared by a long line. One long line that moves fast will still appe…

[deleted]

Re: A single line to 3 cashiers is ~3x faster than a separate line for each cashier

#110
post #27

FYI: This is an example of the branch of mathematics called queueing theory. http://en.wikipedia.org/wiki/Queueing_theory It's a fascinating study requiring a good knowledge of probability to use beyond the simplified models. It turns out from the math that throughput using a single queue is better than using multiple queues.

This is a bit of an aside, but something I've always wondered is: why does this branch of mathematics get labeled as Queueing "theory"?

From my brief understanding, when someone talks about Queueing theory they are not talking about a singular "theory" but they mean something much broader. It doesn't seem as if there is something here that needs to be proved or disproved.

This is a part of naming in mathematics that has always perplexed me.

edit: not sure why this would get downvoted, seems like a simple neophyte question

Post reply on HN