Various operations comparing URI::Fast against URI's performance. The script to recreate is included in the bench folder of the distribution.
bench
Tests were performed on a Pixelbook (i5) and Perl 5.26.2 installed with perlbrew:
perlbrew install --clang -Dusemymalloc -Doptimize=-O3 perl-5.26.2
Earlier testing was done with a similarly equipped MacBook Pro. It is interesting to note that URI::Fast's rate is roughly the same, but URI's rate increased significantly over Perl compiled for MacOS.
Rate URI URI::Fast URI 129199/s -- -88% URI::Fast 1111111/s 760% --
Rate URI URI::Fast URI 104384/s -- -88% URI::Fast 877193/s 740% --
Rate URI URI::Fast URI 65274/s -- -92% URI::Fast 847458/s 1198% --
Rate URI URI::Fast URI 89445/s -- -90% URI::Fast 925926/s 935% --
Rate URI URI::Fast URI 46253/s -- -93% URI::Fast 684932/s 1381% --
Rate URI URI::Fast URI 86207/s -- -86% URI::Fast 625000/s 625% --
Rate URI URI::Fast URI 71633/s -- -85% URI::Fast 480769/s 571% --
Rate URI URI::Fast URI 76923/s -- -88% URI::Fast 617284/s 702% --
Rate URI URI::Fast URI 75988/s -- -85% URI::Fast 515464/s 578% --
Rate URI URI::Fast URI 47483/s -- -89% URI::Fast 413223/s 770% --
Rate URI URI::Fast URI 56370/s -- -87% URI::Fast 438596/s 678% --
Rate URI URI::Fast URI 48263/s -- -87% URI::Fast 364964/s 656% --
Rate URI URI::Fast URI 49801/s -- -88% URI::Fast 416667/s 737% --
Rate URI URI::Fast URI 98814/s -- -79% URI::Fast 471698/s 377% --
Rate URI::Split URI::Fast URI::Split 495050/s -- -64% URI::Fast 1388889/s 181% --
Rate URI::Escape URL::Encode URI::Fast URI::Encode::XS URI::Escape 5962/s -- -26% -100% -100% URL::Encode 8071/s 35% -- -99% -99% URI::Fast 1282051/s 21403% 15785% -- -18% URI::Encode::XS 1562500/s 26106% 19259% 22% --
Rate URL::Encode URI::Escape URI::Fast URI::Encode::XS URL::Encode 6053/s -- -1% -99% -99% URI::Escape 6098/s 1% -- -99% -99% URI::Fast 602410/s 9853% 9778% -- -30% URI::Encode::XS 862069/s 14143% 14036% 43% --
Rate IRI URI::Fast IRI 13998/s -- -99% URI::Fast 1136364/s 8018% --
Rate IRI URI::Fast IRI 12610/s -- -98% URI::Fast 595238/s 4620% --
Rate IRI URI::Fast IRI 11729/s -- -98% URI::Fast 510204/s 4250% --
Rate IRI URI::Fast IRI 11765/s -- -98% URI::Fast 675676/s 5643% --
To install URI::Fast, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::Fast
CPAN shell
perl -MCPAN -e shell install URI::Fast
For more information on module installation, please visit the detailed CPAN module installation guide.