NAME

Algorithm::EventsPerSecond::XS - XS accelerated backend for Algorithm::EventsPerSecond

DESCRIPTION

Do not use this module directly. Algorithm::EventsPerSecond loads it automatically when it is usable and falls back to pure Perl when it is not.

The bucket counts and their timestamps are kept in packed int64_t buffers (Perl strings), so the window scan in _xs_count runs over contiguous memory. When compiled on a machine with AVX2 or SSE4.2 an explicit SIMD path is used; otherwise a branchless scalar loop is emitted that compilers readily auto-vectorize at -O3.

The XS is compiled when perl Makefile.PL && make runs, so the environment variables below take effect at install time:

IF_OPT

The -O optimization value. IF_OPT=2 (or IF_OPT=-O2) compiles with -O2. Defaults to -O3.

IF_ARCH

The target architecture. IF_ARCH=native (or IF_ARCH=-march=native) compiles with -march=native, unlocking whatever SIMD the build host supports. Unset by default, leaving the compiler's baseline.

Passing PUREPERL_ONLY=1 to Makefile.PL skips building the XS entirely, as does lacking a working C compiler; in either case Algorithm::EventsPerSecond uses its pure Perl implementation.

AUTHOR

Zane C. Bowers-Hadley, <vvelox at vvelox.net>

LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by Zane C. Bowers-Hadley.

This is free software, licensed under:

The GNU Lesser General Public License, Version 2.1, February 1999