# 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 installed with
L<perlbrew|https://perlbrew.pl>. 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       149925/s             --           -87%
        URI::Fast      1176471/s           685%             --


=head2 Parse scheme

                            Rate            URI      URI::Fast
              URI       119474/s             --           -87%
        URI::Fast       952381/s           697%             --


=head2 Update scheme

                            Rate            URI      URI::Fast
              URI        58720/s             --           -91%
        URI::Fast       653595/s          1013%             --


=head2 Parse authorization

                            Rate            URI      URI::Fast
              URI        79051/s             --           -91%
        URI::Fast       869565/s          1000%             --


=head2 Update authorization

                            Rate            URI      URI::Fast
              URI        54645/s             --           -92%
        URI::Fast       684932/s          1153%             --


=head2 Parse path (scalar)

                            Rate            URI      URI::Fast
              URI        74627/s             --           -86%
        URI::Fast       549451/s           636%             --


=head2 Parse path (list)

                            Rate            URI      URI::Fast
              URI        75472/s             --           -82%
        URI::Fast       427350/s           466%             --


=head2 Update path (scalar)

                            Rate            URI      URI::Fast
              URI        83195/s             --           -87%
        URI::Fast       632911/s           661%             --


=head2 Update path (array)

                            Rate            URI      URI::Fast
              URI        82440/s             --           -82%
        URI::Fast       465116/s           464%             --


=head2 Parse query

                            Rate            URI      URI::Fast
              URI        49407/s             --           -87%
        URI::Fast       390625/s           691%             --


=head2 Set query parameter

                            Rate            URI      URI::Fast
              URI        61200/s             --           -86%
        URI::Fast       423729/s           592%             --


=head2 Query form

                            Rate            URI      URI::Fast
              URI        45537/s             --           -85%
        URI::Fast       298507/s           556%             --


=head2 Query keys

                            Rate            URI      URI::Fast
              URI        48473/s             --           -84%
        URI::Fast       303030/s           525%             --


=head2 Stringification

                            Rate            URI      URI::Fast
              URI       107296/s             --           -70%
        URI::Fast       355872/s           232%             --


=head2 uri_split

                            Rate     URI::Split      URI::Fast
       URI::Split       505051/s             --           -60%
        URI::Fast      1250000/s           147%             --


=head2 Encode

                            Rate    URI::Escape    URL::Encode
      URI::Escape         5031/s             --           -26%
      URL::Encode         6821/s            36%             --
        URI::Fast      1111111/s         21984%         16190%
  URI::Encode::XS      1470588/s         29129%         21460%


=head2 Decode

                            Rate    URI::Escape    URL::Encode
      URI::Escape         5380/s             --            -4%
      URL::Encode         5578/s             4%             --
  URI::Encode::XS       740741/s         13669%         13181%
        URI::Fast       813008/s         15012%         14476%


=head2 IRI - ctor

                            Rate            IRI      URI::Fast
              IRI        15413/s             --           -98%
        URI::Fast       943396/s          6021%             --


=head2 IRI - query_hash

                            Rate            IRI      URI::Fast
              IRI        11387/s             --           -97%
        URI::Fast       450450/s          3856%             --


=head2 IRI - set param

                            Rate            IRI      URI::Fast
              IRI        11795/s             --           -97%
        URI::Fast       393701/s          3238%             --


=head2 IRI - update path

                            Rate            IRI      URI::Fast
              IRI        12674/s             --           -98%
        URI::Fast       588235/s          4541%             --


