Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: simd Clear Filter

Faster substring search with SIMD in Zig

Faster substring search with SIMD in Zig I’ve been learning a lot about low-level programming languages lately, and for a long time there has been one thing that has interested me: SIMD (or ‘single instruction, multiple data’) code. I’ve seen a lot of articles about having massive performance gains by utilizing SIMD and wanted to learn how to do it myself. This article is a journey into implementing ~60% faster substring searching compared to Zig’s std.mem.indexOf using a SIMD-friendly algorit

Topics: 32 const needle simd zig

The messy reality of SIMD (vector) functions

We’ve discussed SIMD and vectorization extensively on this blog, and it was only a matter of time before SIMD (or vector) functions came up. In this post, we explore what SIMD functions are, when they are useful, and how to declare and use them effectively. A SIMD function is a function that processes more than one piece of data. Take for example a mathematical sin function: double sin(double angle); This function takes one double and returns one double. The vector version that processes four