Skip to content

Add LSX/LASX implementations#119

Open
Gelbpunkt wants to merge 1 commit intorusticstuff:mainfrom
Gelbpunkt:lsx
Open

Add LSX/LASX implementations#119
Gelbpunkt wants to merge 1 commit intorusticstuff:mainfrom
Gelbpunkt:lsx

Conversation

@Gelbpunkt
Copy link
Copy Markdown

@Gelbpunkt Gelbpunkt commented Mar 29, 2026

This adds a LSX and a LASX-accelerated implementation for loongarch64. LSX is present on virtually almost all LoongArch processors, LASX is present on workstation and server CPUs.

The performance is not super great, especially on non-latin input, but the penalty over std is mostly acceptable:

basic = LSX
basic_lasx = LASX
std = std

image

Benchmarked and validated on a Loongson 3B6000 12-core CPU @ 2.2 GHz. It passes all tests.

@Gelbpunkt Gelbpunkt changed the title Add a LSX implementation Add LSX/LASX implementations Mar 29, 2026
Copy link
Copy Markdown

@ksco ksco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of any_bit_set and is_ascii looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants