/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
When would you ever want bubblesort? (2023)
(buttondown.com)
108 points
atan2
| 1 comments |
10 Dec 25 21:45 UTC
|
HN request time: 0.368s
|
source
Show context
JSR_FDED
◴[
10 Dec 25 23:02 UTC
]
No.
46225249
[source]
▶
>>46224311 (OP)
#
I’ve used it when I didn’t want the hassle of another dependency
replies(1):
>>46225834
#
jhallenworld
◴[
10 Dec 25 23:57 UTC
]
No.
46225834
[source]
▶
>>46225249
#
I've used it on a tiny microcontroller because libc's quicksort was huge.
replies(1):
>>46226826
#
1.
bxparks
◴[
11 Dec 25 02:09 UTC
]
No.
46226826
[source]
▶
>>46225834
#
Shell sort is sooo much faster than Bubble sort for tiny microcontrollers, for only a little bit more flash memory, like 40-100 bytes. If that's too much, then Insertion sort is 6X faster than Bubble sort, for only 10-20 bytes of extra flash.
ID:
GO
↑