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 116822/s -- -87% URI::Fast 892857/s 664% --
Rate URI URI::Fast URI 92764/s -- -89% URI::Fast 847458/s 814% --
Rate URI URI::Fast URI 57937/s -- -93% URI::Fast 847458/s 1363% --
Rate URI URI::Fast URI 60606/s -- -89% URI::Fast 555556/s 817% --
Rate URI URI::Fast URI 38344/s -- -94% URI::Fast 632911/s 1551% --
Rate URI URI::Fast URI 85763/s -- -86% URI::Fast 602410/s 602% --
Rate URI URI::Fast URI 71023/s -- -86% URI::Fast 505051/s 611% --
Rate URI URI::Fast URI 76453/s -- -87% URI::Fast 588235/s 669% --
Rate URI URI::Fast URI 75758/s -- -84% URI::Fast 471698/s 523% --
Rate URI URI::Fast URI 45579/s -- -89% URI::Fast 423729/s 830% --
Rate URI URI::Fast URI 53706/s -- -87% URI::Fast 413223/s 669% --
Rate URI URI::Fast URI 45746/s -- -88% URI::Fast 381679/s 734% --
Rate URI URI::Fast URI 45537/s -- -88% URI::Fast 384615/s 745% --
Rate URI URI::Fast URI 83472/s -- -75% URI::Fast 335570/s 302% --
Rate URI::Split URI::Fast URI::Split 458716/s -- -55% URI::Fast 1020408/s 122% --
Rate URI::Escape URL::Encode URI::FastURI::Encode::XS URI::Escape 5218/s -- -26% -100% -100% URL::Encode 7016/s 34% -- -99% -99% URI::Fast 1111111/s 21196% 15738% -- -4% URI::Encode::XS 1162791/s 22186% 16474% 5% --
Rate URL::Encode URI::Escape URI::FastURI::Encode::XS URL::Encode 5568/s -- -3% -99% -99% URI::Escape 5714/s 3% -- -99% -99% URI::Fast 568182/s 10105% 9844% -- -33% URI::Encode::XS 847458/s 15120% 14732% 49% --
Rate IRI URI::Fast IRI 12207/s -- -99% URI::Fast 847458/s 6842% --
Rate IRI URI::Fast IRI 11299/s -- -98% URI::Fast 617284/s 5363% --
Rate IRI URI::Fast IRI 11455/s -- -98% URI::Fast 505051/s 4309% --
Rate IRI URI::Fast IRI 11740/s -- -98% URI::Fast 746269/s 6257% --
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.