Task#19
Position5
Score45,222
Best Score43,624
Points0.965

Problem Statement

You have a data stream of uint8 numbers in binary representation sending to STDIN. The data is a set of pixels in RGB format (each pixel is presented by 3 bytes).

You need to send only the Blue component of each pixel to STDOUT.

The number of pixels is 150 000 000.

Input Generator

Random Bytes (distcheck doesn’t really matter for this challenge)

Solution Sketch

The verifier has the same kernel as my own solution, but it’s just a load shuffle store pipeline.

    //   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15 |  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31
    //
    // R00 G00 B00 R01 G01 B01 R02 G02 B02 R03 G03 B03 R04 G04 B04 R05 | G05 B05 R06 G06 B06 R07 G07 B07 R08 G08 B08 R09 G09 B09 R10 G10
    // B10 R11 G11 B11 R12 G12 B12 R13 G13 B13 R14 G14 B14 R15 G15 B15 | R16 G16 B16 R17 G17 B17 R18 G18 B18 R19 G19 B19 R20 G20 B20 R21
    // G21 B21 R22 G22 B22 R23 G23 B23 R24 G24 B24 R25 G25 B25 R26 G26 | B26 R27 G27 B27 R28 G28 B28 R29 G29 B29 R30 G30 B30 R31 G31 B31
    //
    // B00 B01 B02 B03 B04 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | ___ ___ ___ ___ ___ B05 B06 B07 B08 B09 ___ ___ ___ ___ ___ ___
    // ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ B10 B11 B12 B13 B14 B15 | B16 B17 B18 B19 B20 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
    // ___ ___ ___ ___ ___ B21 B22 B23 B24 B25 ___ ___ ___ ___ ___ ___ | ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ B26 B27 B28 B29 B30 B31
    //
    // B00 B01 B02 B03 B04 B05 B06 B07 B08 B09 B10 B11 B12 B13 B14 B15 | B16 B17 B18 B19 B20 B21 B22 B23 B24 B25 B26 B27 B28 B29 B30 B31

All other improvements are a result of Memory Access

Thoughts

Same family of problems as Blue from RGBA and Count uint8.