Mill Computing, Inc. Forums The Mill Architecture pdep and pext instructions

  • Author
  • Validark
    Post count: 20
    #3853 |

    Does the Mill support bitwise gather (pext) and bitwise scatter (pdep) operations? It was stated here that the Mill currently lacks such compaction/expansion operations (the analogous vector operations).

    pdep and pext are very awesome new fundamental bitwise operations that are applicable in a lot of different settings. See my proposal to add it to Zig for more references.

    I hope you consider adding it. I also linked two papers on that page that explain how to implement it on a butterfly network.

  • Ivan Godard
    Post count: 687

    There are no such instructions, and the Forum comment you cite still applies.

    SIMD extensions in general are of use primarily for bit polishing. The Mill design approach favors generality and elegance over specialized operations whose benefit may not be visible in the noise of general purpose code. Absent (paid) customer demand we’d wait until the overhead that such instructions would reduce is more than 1% of cycles.

  • vasama
    Post count: 1

    These instructions are such that it’s pointless to try to emulate them in software. Instead one would choose a different algorithm altogether if the instructions are not available. They’re quite useful for all sorts of things such as Morton order data layouts for better cache usage, quad tree construction, VLQ encoding, and many others no doubt.

You must be logged in to reply to this topic.