# PODNAME: URI::Fast::Benchmarks
# ABSTRACT: Benchmarks comparing URI::Fast and URI

=head1 BENCHMARKS

Various operations comparing L<URI::Fast> against L<URI>'s performance. The
script to recreate is included in the C<bench> folder of the distribution.

Tests were performed on a Pixelbook (i5) and Perl 5.26.2 installed with
L<perlbrew|https://perlbrew.pl>:

  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.

=head2 Constructor

                            Rate            URI      URI::Fast
              URI       129199/s             --           -88%
        URI::Fast      1111111/s           760%             --


=head2 Get scheme

                            Rate            URI      URI::Fast
              URI       104384/s             --           -88%
        URI::Fast       877193/s           740%             --


=head2 Set scheme

                            Rate            URI      URI::Fast
              URI        65274/s             --           -92%
        URI::Fast       847458/s          1198%             --


=head2 Get authority

                            Rate            URI      URI::Fast
              URI        89445/s             --           -90%
        URI::Fast       925926/s           935%             --


=head2 Set authority

                            Rate            URI      URI::Fast
              URI        46253/s             --           -93%
        URI::Fast       684932/s          1381%             --


=head2 Get path (scalar)

                            Rate            URI      URI::Fast
              URI        86207/s             --           -86%
        URI::Fast       625000/s           625%             --


=head2 Get path (list)

                            Rate            URI      URI::Fast
              URI        71633/s             --           -85%
        URI::Fast       480769/s           571%             --


=head2 Set path (scalar)

                            Rate            URI      URI::Fast
              URI        76923/s             --           -88%
        URI::Fast       617284/s           702%             --


=head2 Set path (array)

                            Rate            URI      URI::Fast
              URI        75988/s             --           -85%
        URI::Fast       515464/s           578%             --


=head2 Get query

                            Rate            URI      URI::Fast
              URI        47483/s             --           -89%
        URI::Fast       413223/s           770%             --


=head2 Set query parameter

                            Rate            URI      URI::Fast
              URI        56370/s             --           -87%
        URI::Fast       438596/s           678%             --


=head2 Get query (hash)

                            Rate            URI      URI::Fast
              URI        48263/s             --           -87%
        URI::Fast       364964/s           656%             --


=head2 Get query keys

                            Rate            URI      URI::Fast
              URI        49801/s             --           -88%
        URI::Fast       416667/s           737%             --


=head2 Stringification

                            Rate            URI      URI::Fast
              URI        98814/s             --           -79%
        URI::Fast       471698/s           377%             --


=head2 uri_split

                            Rate     URI::Split      URI::Fast
       URI::Split       495050/s             --           -64%
        URI::Fast      1388889/s           181%             --


=head2 Encode

                            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%             --


=head2 Decode

                            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%              --


=head2 IRI - ctor

                            Rate            IRI      URI::Fast
              IRI        13998/s             --           -99%
        URI::Fast      1136364/s          8018%             --


=head2 IRI - set query (hash)

                            Rate            IRI      URI::Fast
              IRI        12610/s             --           -98%
        URI::Fast       595238/s          4620%             --


=head2 IRI - set param

                            Rate            IRI      URI::Fast
              IRI        11729/s             --           -98%
        URI::Fast       510204/s          4250%             --


=head2 IRI - set path

                            Rate            IRI      URI::Fast
              IRI        11765/s             --           -98%
        URI::Fast       675676/s          5643%             --


