Vince's CSV Parser
Loading...
Searching...
No Matches
basic_csv_parser_simd.hpp File Reference

SIMD-accelerated skip for runs of non-special CSV bytes. More...

#include "common.hpp"

Go to the source code of this file.

Classes

struct  csv::internals::SentinelVecs
 

Namespaces

namespace  csv
 The all encompassing namespace.
 

Functions

size_t csv::internals::find_next_non_special (csv::string_view data, size_t pos, const SentinelVecs &sentinels) noexcept
 

Detailed Description

SIMD-accelerated skip for runs of non-special CSV bytes.

Conservative design: any byte that could be the delimiter, quote character,
, or \r causes an early return.

Uses 4x cmpeq rather than a lookup-table shuffle because CSV has only four sentinel characters. vpshufb (shuffle) truncates index bytes to their low nibble, causing aliasing across 16-byte boundaries and silently skipping real delimiters. The cmpeq approach is alias-free and equally fast for small sentinel sets.

UTF-8 safe: all CSV structural bytes are single-byte ASCII; multi-byte sequences (values > 0x7F) are never misidentified as special.

Definition in file basic_csv_parser_simd.hpp.

Function Documentation

◆ find_next_non_special()

size_t csv::internals::find_next_non_special ( csv::string_view  data,
size_t  pos,
const SentinelVecs sentinels 
)
inlinenoexcept

Definition at line 80 of file basic_csv_parser_simd.hpp.