Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

selectFrom and rearrange (vectorized lookup tables) are going to be slow #54

Copy link
Copy link
@lemire

Description

@lemire
Issue body actions

When parsing strings with SIMD instructions, vectorized table lookup like vpshufb (x64) or vtbl (NEON) are critically important. They are very cheap (often run in 1 cycle) and very powerful. And indeed, the simdjson-java library makes extensive use of rearrange and selectFrom (part of the Java Vector API). At a glance, it may appear that rearrange and selectFrom are just wrapper around the fast underlying instructions (e.g., vpshufb or vtbl). But they are not. They generate a long flow of instructions. So it is unlike C#/dotnet where you have Ssse3.Shuffle or AdvSimd.Arm64.VectorTableLookup for example.

Thus, I am afraid that it its current state, Java Vector might be "performance challenged". It is simply too high level.

I have reported the design issue. See https://mail.openjdk.org/pipermail/panama-dev/2024-June/020476.html

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.