Re:How the JVM compares strings on x86 using pcmpestri
by amelius on Sunday January 07, 2018 @07:50AM
(#16090686)
Thanks for the tl;dr. I think the "crazy" adjective refers to the instruction, and not to the use of it. As the article explains, the instruction is quite complicated and has a large number of parameters.
Re:How the JVM compares strings on x86 using pcmpestri
by B4TMAN on Sunday January 07, 2018 @08:00AM
(#16090720)
Is there any place to get a proper manual of all these uses?
Re:How the JVM compares strings on x86 using pcmpestri
by brianon99 on Sunday January 07, 2018 @09:57AM
(#16091030)
Agree that using vector instruction is not crazy at all. I am quite interested when I see the article title, and then deeply disappointed after I read it. I was expecting something like the strlen shown in the book The Hackers Delight, which loads 4 bytes into a int, ad then some bit masking and subtraction and a nlz (number of leading zero) to index the first 0 byte. Please read it first and that is what really what meant by crazy.
(vpcmpestri (of the pcmpxstrx family) isn't an especially crazy instruction to use for string comparison. That's what it's designed for.)