Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
My sampling of the real world is performed via X, formerly Twitter.
-
Introduction Changing letters case is something that appear handy in many situations, for instance input normalization, parsing, and other text-related tasks.
-
Introduction I get back to work on simdutf recently, and noticed that the library gained support for LoongArch64.
-
Problem Printing 64-bit numbers in binary format can be done nicely with AVX-512 instructions.
-
Introduction Binary heap is a binary tree data structure having some interesting properties.
-
Problem We have a tree of any degree and depth.
-
Introduction I dedicated the last few days of 2024 on refreshing my website.
-
Introduction The BMI2 extension introduced two complementary instructions: parallel bits deposit (PDEP) and parallel bits extract (PEXT).
-
Introduction This is a follow-up text for Dividing unsigned 8-bit numbers.
-
Introduction Division is quite an expensive operation.
-
Myriad sequences The RISC-V assembler defines the pseudo-instruction li that load an immediate into a register.
-
Introduction The goal of this text is to provide an overview of RISC-V Vector extension (RVV), and compare — when applicable — with widespread SIMD vector instruction sets: SSE, AVX, AVX-512, ARM Neon and SVE.
-
Introduction One great feature that some of CLI applications and compilers recently gained is providing suggestions in the case of misspellings arguments or options.
-
Introduction One of the hardest problem in SIMD is dealing with non-continuous data accesses, that appear pretty common.
-
Introduction Looking up in a static set of strings is a common problem we encounter when parsing any textual formats.
-
Introduction Just for recap, an IPv4 address written in the textual form consists four decimal numbers separated by the dot character.
-
Introduction When I was browsing the source code of project Ada (WHATWG-compliant and fast URL parser written in modern C++) the following procedure caught my attention: ada_really_inline size_t find_authority_delimiter_special(std::string_view view) noex…
-
Introduction The problem is defined as follows: we have separate lanes (32-bit or 64-bit) and want to find the position of the first occurrence of the given byte in each lane.
-
Introduction Suppose we have a binary fraction, that is positive and less than 1: 0.101011000┈┈┈ = 0.671875 | | |│ │ │ │└─╴ 1/2^6 │ │ └──╴ 1/2^5 │ └────╴ 1/2^3 └──────╴ 1/2^1 We want to express it as a ratio of two integer numbers.
-
Introduction A well known method of calculating powers of integers is based on the binary representation of an exponent.
-
Introduction There are several approaches to find lowest common ancestor (LCA).
-
Introduction AVX512 lacks of counting trailing zeros; it supports counting of leading zeros via instruction VPLZCNTD in 32- and 64-bit words.
-
Introduction We want to check if a value belongs to a set.
-
Introduction AVX512 code often needs constants that repeat in 64-, 32-, 16- or 8-bit lanes.
-
Introduction At Sneller we had the following problem: there are sixteen 4-bit values, we need a histogram for that limited set.
-
The other day I came across the following line: len * ("11124811248484"[type < 14 ?
-
Every year in January I download the Apache logs for my home page.
-
Introduction When we started to use boost::beast library at work, obviously I downloaded its source code.
-
Introduction A quite popular varuint format lets to save an arbitrary integer number on a sequence of bytes.
-
Introduction A non-validating parsing from hexadecimal string can be vectorized: Using SSE to convert from hexadecimal ASCII to number.
-
Problem The problem: there is a bitmask (16-, 32-, 64-bit).
-
Introduction This is follow up to Daniel Lemire's Converting integers to fix-digit representations quickly.
-
Problem We want to check if at least one integer value is zero.
-
Introduction This year I re-checked the status of autovectorization in the latest GCC and Clang.
-
Introduction This is a follow up to article SIMDized counting byte in byte stream.
-
Introduction We want to detect if all bytes stored in a SIMD register (SSE, AVX2, AVX512, Neon etc.) are the same.
-
Introduction Almost two years ago I did an in-depth comparison of autovectorization abilities of popular compilers: GCC, clang, ICC and MSVC.
-
Introduction The value of binomial coefficient kovern can be expressed as n!
-
Introduction This article was inspired by Geoff Langdale's text Why Ice Lake is Important (a bit-basher’s perspective).
-
Introduction Positional population count (pospopcnt) is a procedure that calculates the histogram for bits placed at given position in a byte, word or double word etc. from larger stream of such entities.
-
Introduction When we allocate memory using malloc or another interface, like operator new in C++, we get a pointer and promise that nobody else would acquire the same memory area.
-
Introduction There are two main purposes of a switch statement: Express simple function that translate from one set of values into another, like getting a string representation of enum values.
-
Introduction Update 2021-02-17: please check the newest status of GCC & Clang, and MSVC.
-
Introduction We want to count how many times given byte occurs in a byte stream; here is a C program doing this: #include <stdint.h> #include <stddef.h> size_t countbyte(uint8_t* data, size_t size, uint8_t b) { size_t result = 0; for (size_t i=0;…
-
Overloaded functions Let us consider this simple use case, where we want to invoke a function: void invoke_callback(std::function<void(int, int)>); Everything works fine when a callback is a lambda. auto callback = [](int, int){}; invoke_callback(callbac…
-
Introduction pyahocorasick is a python module I started in 2011.
-
Introduction To my surprise I quite often need to read the whole contents of a file into a string.
-
Introduction Removing spaces from a string is a common task in text processing.
-
I need to copy a file to another directory whenever it got changed.
-
Introduction In November this year there was new edition of code::dive, an IT conference in Wrocław, Poland.