Sorting algorithms/Insertion sort: Difference between revisions

m
→‎AArch64 Assembly: Slightly improved efficiency of my previous edition
imported>StraightDoubt
(Added another example for the section under AArch64 Assembly)
imported>StraightDoubt
m (→‎AArch64 Assembly: Slightly improved efficiency of my previous edition)
Line 208:
// *J = INNER_TMP;
mov J, I
b 3f
1:
// Loop body
str INNER_TMP, [J], #-4
3:
// Loop test
cmp J, ARR_BEGIN
Line 214 ⟶ 218:
ldr INNER_TMP, [J, #-4]
cmp INNER_TMP, OUTER_TMP
b.legt 1f1b
 
// Loop body
str INNER_TMP, [J], #-4
b 1b
1:
str OUTER_TMP, [J] // *J = OUTER_TMP