Nearly All Binary Searches and Mergesorts Are Broken (2006)
research.googleblog.com
Nearly All Binary Searches and Mergesorts Are Broken (2006)
1–10 of 95 posts
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#2Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#3That line from the C/C++ "fix" is an atrocity; `low`, `mid`, and `high` should never have been declared as signed integers in the first place, since array indices are never negative. It's unfortunate that in Java there is no other option than to use signed ints.
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#4It's interesting how much things have changed in the last decade. I wonder what next decade's "Rails" will be? Could it be possible to predict?
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#5I wish it was worth a lot to be good at systems programming these days. It seems like the huge salaries are for rails senior devs. I spent like ten years getting really good at this stuff (the (low + high)/2 line jumped right out at me) but nowadays it feels like being really good at trivial pursuit. It's interesting how much things have changed in the last decade. I wonder what next decade's "Rails" will be? Could i…
Edit: Did not mean to "mock" the OP, just merely trying to showing that you can apply that thought to almost anything in the programming world by replacing the technology/language names.
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#6That line from the C/C++ "fix" is an atrocity; `low`, `mid`, and `high` should never have been declared as signed integers in the first place, since array indices are never negative. It's unfortunate that in Java there is no other option than to use signed ints.
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#7I wish it was worth a lot to be good at systems programming these days. It seems like the huge salaries are for rails senior devs. I spent like ten years getting really good at this stuff (the (low + high)/2 line jumped right out at me) but nowadays it feels like being really good at trivial pursuit. It's interesting how much things have changed in the last decade. I wonder what next decade's "Rails" will be? Could i…
I wish it was worth a lot to be good at assembly these days. It seems like the huge salaries are for c++ devs. I spent like ten years getting really good at this stuff but nowadays it feels like being really good at trivial pursuit. Edit: Did not mean to "mock" the OP, just merely trying to showing that you can apply that thought to almost anything in the programming world by replacing the technology/language names.
Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#8Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#9Re: Nearly All Binary Searches and Mergesorts Are Broken (2006)
#10That line from the C/C++ "fix" is an atrocity; `low`, `mid`, and `high` should never have been declared as signed integers in the first place, since array indices are never negative. It's unfortunate that in Java there is no other option than to use signed ints.
Agreed completely; the right fix is that anything indexing an array should be an unsigned size_t (or equivalent for your language of choice).