Polyphase merge example sorted runs of size 3 -- . 0 0 0 1 1 3 3 3 3 E H T I Q U B C K O R W F N X J M P L S V A Y Z D G * --- %ps 3 1 62 128 redbox %ps 3 1 128 194 redbox %ps 3 1 194 260 redbox %ps 3 1 260 326 redbox %ps 3 1 326 392 redbox %ps 3 1 392 456 redbox %ps 3 1 456 522 redbox %ps 3 1 522 586 redbox %ps 3 1 586 652 redbox result of phase 1 -- . 0 3 3 2 2 B C K A Y Z D G * E H J M O P R T W F I L N S Q U V X --- %ps 6 1 62 128 redbox %ps 6 1 128 194 redbox %ps 6 1 194 260 redbox %ps 6 1 260 456 redbox %ps 6 1 456 652 redbox result of phase 2 -- . 3 2 1 D G * F I L N S Q U V X A B C E H J K M O P R T W Y Z --- %ps 9 1 62 128 redbox %ps 9 1 128 326 redbox %ps 9 1 326 652 redbox output -- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z * --- sorted runs (lengths) on devices merge cost -- . 0 1 2 3 . ---------------------------- . 3(3) 2(3) 0 4(3) . 1(3) 0 2(9) 2(3) 18 . 0 1(15) 1(9) 1(3) 15 . 1(27) 0 0 0 27 --- %ps linesreset -----