[Libre-soc-dev] validating utf-8 using vector processing

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Oct 20 00:40:11 BST 2020


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Tue, Oct 20, 2020 at 12:13 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> https://lemire.me/blog/2018/05/16/validating-utf-8-strings-using-as-little-as-0-7-cycles-per-byte/

neat trick.  spot the 8th bit in batches, process it afterwards.

> They use x86 SIMD but it should be directly translatable to SimpleV. This
> is another application where multiple masks with large VL could be very
> useful.

yes.  this is where that "find the first non-zero bit" is a crucial
bitmanip operation.

l.



More information about the Libre-soc-dev mailing list