Data::ULID::XS - XS backend for ULID generation
use Data::ULID::XS qw(ulid binary_ulid); # use like Data::ULID
This module replaces some parts of Data::ULID that are performance-critical with XS counterparts. Its interface is the same as Data::ULID, but you get free XS speedups.
Beta quality: while this module works well in general cases, it may also contain errors common to C code like memory leaks or access violations. Please do report if you encounter any problems.
Same as Data::ULID. All functions should work exactly the same, but ulid and binary_ulid called with no arguments are reimplemented in XS.
ulid
binary_ulid
Comparing speeds of Perl and XS implementations:
Rate Data::ULID::ulid Data::ULID::binary_ulid Data::ULID::XS::ulid Data::ULID::XS::binary_ulid Data::ULID::ulid 97342/s -- -68% -88% -91% Data::ULID::binary_ulid 301501/s 210% -- -62% -71% Data::ULID::XS::ulid 793885/s 716% 163% -- -24% Data::ULID::XS::binary_ulid 1043509/s 972% 246% 31% --
Benchmark ran on Thinkpad T480 (i7-8650U) and FreeBSD 12.3.
Data::ULID
Types::ULID
Bartosz Jarzyna, <bbrtj.pro@gmail.com>
Copyright (C) by Bartosz Jarzyna
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::ULID::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::ULID::XS
CPAN shell
perl -MCPAN -e shell install Data::ULID::XS
For more information on module installation, please visit the detailed CPAN module installation guide.