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        62893/s             --           -86%
URI::Fast       441176/s           601%             --

Get scheme

                    Rate            URI      URI::Fast
      URI        58366/s             --           -87%
URI::Fast       441176/s           656%             --

Set scheme

                    Rate            URI      URI::Fast
      URI        30675/s             --           -95%
URI::Fast       588235/s          1818%             --

Get authority

                    Rate            URI      URI::Fast
      URI        44379/s             --           -89%
URI::Fast       416667/s           839%             --

Set authority

                    Rate            URI      URI::Fast
      URI        27675/s             --           -91%
URI::Fast       300000/s           984%             --

Get path (scalar)

                    Rate            URI      URI::Fast
      URI        50934/s             --           -82%
URI::Fast       283019/s           456%             --

Get path (list)

                    Rate            URI      URI::Fast
      URI        38265/s             --           -84%
URI::Fast       234375/s           512%             --

Set path (scalar)

                    Rate            URI      URI::Fast
      URI        43796/s             --           -85%
URI::Fast       285714/s           552%             --

Set path (array)

                    Rate            URI      URI::Fast
      URI        45113/s             --           -80%
URI::Fast       230769/s           412%             --

Get query

                    Rate            URI      URI::Fast
      URI        27498/s             --           -86%
URI::Fast       198675/s           623%             --

Set query parameter

                    Rate            URI      URI::Fast
      URI        31024/s             --           -84%
URI::Fast       200000/s           545%             --

Get query (hash)

                    Rate            URI      URI::Fast
      URI        24390/s             --           -85%
URI::Fast       165746/s           580%             --

Get query keys

                    Rate            URI      URI::Fast
      URI        24019/s             --           -88%
URI::Fast       197368/s           722%             --

Stringification

                    Rate            URI      URI::Fast
      URI        55970/s             --           -78%
URI::Fast       258621/s           362%             --

Build relative path

                    Rate            URI      URI::Fast
      URI        10345/s             --           -82%
URI::Fast        57143/s           452%             --

Build absolute path

                    Rate            URI      URI::Fast
      URI        14375/s             --           -93%
URI::Fast       197368/s          1273%             --

Normalize (canonical)

                    Rate            URI      URI::Fast
      URI         9488/s             --           -97%
URI::Fast       375000/s          3852%             --

uri_split

                     Rate     URI::Split      URI::Fast
URI::Split       258621/s             --           -66%
 URI::Fast       769231/s           197%             --

Encode

                          Rate    URI::Escape    URL::EncodeURI::Encode::XS      URI::Fast
    URI::Escape         3285/s             --           -27%          -100%          -100%
    URL::Encode         4483/s            36%             --           -99%           -99%
URI::Encode::XS       666667/s         20196%         14771%             --            -7%
      URI::Fast       714286/s         21645%         15833%             7%             --

Decode

                          Rate    URI::Escape    URL::Encode      URI::FastURI::Encode::XS
    URI::Escape         3484/s             --            -3%           -99%           -99%
    URL::Encode         3574/s             3%             --           -99%           -99%
      URI::Fast       394737/s         11230%         10943%             --           -17%
URI::Encode::XS       476190/s         13568%         13222%            21%             --

IRI - ctor

                    Rate            IRI      URI::Fast
      IRI         8923/s             --           -98%
URI::Fast       526316/s          5798%             --

IRI - set query (hash)

                    Rate            IRI      URI::Fast
      IRI         7422/s             --           -98%
URI::Fast       454545/s          6024%             --

IRI - set param

                    Rate            IRI      URI::Fast
      IRI         8060/s             --           -98%
URI::Fast       361446/s          4384%             --

IRI - set path

                    Rate            IRI      URI::Fast
      IRI         8132/s             --           -97%
URI::Fast       303030/s          3626%             --

SOFTWARE VERSIONS

URI::Fast 0.40_01
URI 1.74
URI::Split 1.74
URL::Encode 0.03
URI::Escape 3.31
URI::Encode::XS 0.11
IRI 0.008

PERL

Summary of my perl5 (revision 5 version 26 subversion 2) configuration:
   
  Platform:
    osname=linux
    osvers=4.14.56-05956-g5b9b9e14a8dc
    archname=x86_64-linux
    uname='linux penguin 4.14.56-05956-g5b9b9e14a8dc #1 smp preempt wed jul 25 14:33:50 pdt 2018 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/user/perl5/perlbrew/perls/perl-5.26.2-fast -Dusemymalloc -Doptimize=-O3 -Aeval:scriptdir=/home/user/perl5/perlbrew/perls/perl-5.26.2-fast/bin'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=y
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O3'
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='6.3.0 20170516'
    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='cc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /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 /lib64 /usr/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O3 -L/usr/local/lib -fstack-protector-strong'