4 ms·
Hash sort is surprisingly fast: for x in [0 ... VA.length] ind = VA.get(x)-1 VA.swap(x, ind + VA.length) for x in [0 ... VA.length] VA.swap(x,
by jethroalias97 15y ago
Hash sort is surprisingly fast:
for x in [0 ... VA.length]
ind = VA.get(x)-1
VA.swap(x, ind + VA.length)
for x in [0 ... VA.length]
VA.swap(x, x + VA.length)
- rfugger 15y agoThat's cheating somehow...
- DrHankPym 15y agoTrading a tremendous amount of memory for speed. Try replacing a list of integers with a list of Images. You might lock up the browser.
- deleted 15y ago[deleted]
- anonymoushn 15y agoIn 1/2 as many swaps: for x in [0 ... VA.length] ind = VA.get(x)-1 while ind != x VA.swap(x, ind) ind = VA.get(x)-1
- iam 15y agoThat's pretty cool. Is that related to this? http://arxiv.org/abs/cs/0408040 http://arxiv.org/abs/cs/0408040