Optimize sort4 based on practical tests

This commit is contained in:
Gabriel Tofvesson 2019-04-29 23:16:26 +02:00
parent d067a72c38
commit ae3d25bf65

View File

@ -214,11 +214,12 @@ mov ar asr; bra @PREPARE_SORT
// Actual bucketsort
$PREPARE_SORT $PREPARE_SORT
mov pm pc; mov pm lc mov pm pc; mov pm lc // Load bucket length
sub gr; incpc sub gr; incpc // Increment bucket length
mov pc pm mov pc pm // Store new length
//mov ar asr; bls @INSERTION_END_BIGGEST
mov ar pc mov ar pc
$INSERTION $INSERTION
@ -239,5 +240,5 @@ $INSERTION_END_BIGGEST
mov ir pm mov ir pm
$INSERTION_END_NOTBIGGEST $INSERTION_END_NOTBIGGEST
mov hr ar; mov hr pc mov hr pc
mov pc asr; ret mov pc asr; ret