The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

URI::Fast::Benchmarks - comparing URI::Fast to other modules

DESCRIPTION

Various operations comparing URI::Fast with other modules' performance.

Constructor

                    Rate            URI      URI::Fast
      URI       174825/s             --           -87%
URI::Fast      1388889/s           694%             --

Get scheme

                    Rate            URI      URI::Fast
      URI       145985/s             --           -87%
URI::Fast      1123596/s           670%             --

Set scheme

                    Rate            URI      URI::Fast
      URI        78309/s             --           -93%
URI::Fast      1075269/s          1273%             --

Get authority

                    Rate            URI      URI::Fast
      URI       120482/s             --           -89%
URI::Fast      1086957/s           802%             --

Set authority

                    Rate            URI      URI::Fast
      URI        79365/s             --           -92%
URI::Fast      1030928/s          1199%             --

Get path (scalar)

                    Rate            URI      URI::Fast
      URI       153139/s             --           -79%
URI::Fast       746269/s           387%             --

Get path (list)

                    Rate            URI      URI::Fast
      URI       119474/s             --           -83%
URI::Fast       714286/s           498%             --

Set path (scalar)

                    Rate            URI      URI::Fast
      URI       132275/s             --           -85%
URI::Fast       892857/s           575%             --

Set path (array)

                    Rate            URI      URI::Fast
      URI       130208/s             --           -81%
URI::Fast       684932/s           426%             --

Get query

                    Rate            URI      URI::Fast
      URI        76864/s             --           -87%
URI::Fast       613497/s           698%             --

Set query parameter

                    Rate            URI      URI::Fast
      URI        93023/s             --           -86%
URI::Fast       645161/s           594%             --

Get query (hash)

                    Rate            URI      URI::Fast
      URI        77101/s             --           -86%
URI::Fast       540541/s           601%             --

Get query keys

                    Rate            URI      URI::Fast
      URI        73206/s             --           -88%
URI::Fast       591716/s           708%             --

Stringification

                    Rate            URI      URI::Fast
      URI       174825/s             --           -72%
URI::Fast       628931/s           260%             --

Build relative path

                    Rate            URI      URI::Fast
      URI        26810/s             --           -86%
URI::Fast       196078/s           631%             --

Build absolute path

                    Rate            URI      URI::Fast
      URI        39216/s             --           -92%
URI::Fast       483092/s          1132%             --

Normalize (canonical)

                    Rate            URI      URI::Fast
      URI        24704/s             --           -98%
URI::Fast      1234568/s          4898%             --

uri_split

                     Rate     URI::Split      URI::Fast
URI::Split      1052632/s             --           -52%
 URI::Fast      2173913/s           107%             --

Encode

                          Rate    URI::Escape    URL::Encode      URI::FastURI::Encode::XS
    URI::Escape         8273/s             --           -32%          -100%          -100%
    URL::Encode        12077/s            46%             --           -99%           -99%
      URI::Fast      1694915/s         20388%         13934%             --           -25%
URI::Encode::XS      2272727/s         27373%         18718%            34%             --

Decode

                          Rate    URL::Encode    URI::Escape      URI::FastURI::Encode::XS
    URL::Encode         9051/s             --            -2%           -99%           -99%
    URI::Escape         9203/s             2%             --           -99%           -99%
      URI::Fast       869565/s          9507%          9349%             --           -10%
URI::Encode::XS       961538/s         10523%         10348%            11%             --

IRI - ctor

                    Rate            IRI      URI::Fast
      IRI        24038/s             --           -99%
URI::Fast      1785714/s          7329%             --

IRI - set query (hash)

                    Rate            IRI      URI::Fast
      IRI        19535/s             --           -98%
URI::Fast       884956/s          4430%             --

IRI - set param

                    Rate            IRI      URI::Fast
      IRI        19639/s             --           -98%
URI::Fast       826446/s          4108%             --

IRI - set path

                    Rate            IRI      URI::Fast
      IRI        20517/s             --           -98%
URI::Fast      1086957/s          5198%             --

SOFTWARE VERSIONS

URI::Fast 0.50
URI 5.05
URI::Split 5.05
URL::Encode 0.03
URI::Escape 5.05
URI::Encode::XS 0.11
IRI 0.011

PERL

Summary of my perl5 (revision 5 version 32 subversion 0) configuration:
   
  Platform:
    osname=linux
    osvers=5.4.0-48-generic
    archname=x86_64-linux
    uname='linux lucy 5.4.0-48-generic #52-ubuntu smp thu sep 10 10:58:49 utc 2020 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/user/perl5/perlbrew/perls/perl-5.32.0 -Dcc=clang -Aeval:scriptdir=/home/user/perl5/perlbrew/perls/perl-5.32.0/bin'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='clang'
    ccflags ='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2'
    cppflags='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='Clang 10.0.0 '
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='clang'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/llvm-10/lib/clang/10.0.0/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.31.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.31'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'