Common platform: Timer: time.perf_counter Bits: int=32, long=64, long long=64, size_t=64, void*=64 Platform: Linux-4.1.5-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two CPU model: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz Python unicode implementation: PEP 393 Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Platform of campaign utf8_before: SCM: hg revision=5b9ffea7e7c3 tag=tip branch=default date="2015-10-05 13:49 +0200" Python version: 3.6.0a0 (default:5b9ffea7e7c3, Oct 5 2015, 13:55:58) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] Date: 2015-10-05 13:57:20 Timer precision: 49 ns Platform of campaign utf8_after: SCM: hg revision=5b9ffea7e7c3+ tag=tip branch=default date="2015-10-05 13:49 +0200" Python version: 3.6.0a0 (default:5b9ffea7e7c3+, Oct 5 2015, 13:50:18) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] Date: 2015-10-05 13:51:01 Timer precision: 57 ns --------------------------+-------------+-------------- ignore: "\udcff" * length | utf8_before | utf8_after --------------------------+-------------+-------------- length=10**1 | 267 ns (*) | 301 ns (+13%) length=10**3 | 963 ns (*) | 989 ns length=10**2 | 331 ns (*) | 367 ns (+11%) length=10**4 | 6.07 us (*) | 6.26 us --------------------------+-------------+-------------- Total | 7.63 us (*) | 7.91 us --------------------------+-------------+-------------- --------------------------------+-------------+-------------- ignore: "a" * length + "\udcff" | utf8_before | utf8_after --------------------------------+-------------+-------------- length=10**1 | 280 ns (*) | 311 ns (+11%) length=10**3 | 1.2 us (*) | 1.2 us length=10**2 | 375 ns (*) | 401 ns (+7%) length=10**4 | 8.84 us (*) | 8.89 us --------------------------------+-------------+-------------- Total | 10.7 us (*) | 10.8 us --------------------------------+-------------+-------------- --------------------------------------------+-------------+----------- ignore: ("a" * 99 + "\udcff" * 99) * length | utf8_before | utf8_after --------------------------------------------+-------------+----------- length=10**1 | 1.99 us (*) | 2.01 us length=10**3 | 191 us (*) | 194 us length=10**2 | 16.9 us (*) | 17.1 us length=10**4 | 1.96 ms (*) | 1.95 ms --------------------------------------------+-------------+----------- Total | 2.17 ms (*) | 2.16 ms --------------------------------------------+-------------+----------- ---------------------------------------+-------------+----------- ignore: ("\udcff" * 99 + "a") * length | utf8_before | utf8_after ---------------------------------------+-------------+----------- length=10**1 | 1.15 us (*) | 1.18 us length=10**3 | 75.8 us (*) | 78.8 us length=10**2 | 7.88 us (*) | 8.23 us length=10**4 | 758 us (*) | 778 us ---------------------------------------+-------------+----------- Total | 843 us (*) | 866 us ---------------------------------------+-------------+----------- --------------------------------+-------------+-------------- ignore: "\udcff" + "a" * length | utf8_before | utf8_after --------------------------------+-------------+-------------- length=10**1 | 283 ns (*) | 313 ns (+11%) length=10**3 | 1.18 us (*) | 1.21 us length=10**2 | 364 ns (*) | 398 ns (+9%) length=10**4 | 8.87 us (*) | 9.08 us --------------------------------+-------------+-------------- Total | 10.7 us (*) | 11 us --------------------------------+-------------+-------------- ---------------------------+-------------+-------------- replace: "\udcff" * length | utf8_before | utf8_after ---------------------------+-------------+-------------- length=10**1 | 302 ns (*) | 333 ns (+10%) length=10**3 | 944 ns (*) | 970 ns length=10**2 | 365 ns (*) | 402 ns (+10%) length=10**4 | 6.26 us (*) | 6.73 us (+7%) ---------------------------+-------------+-------------- Total | 7.87 us (*) | 8.43 us (+7%) ---------------------------+-------------+-------------- ---------------------------------+-------------+-------------- replace: "a" * length + "\udcff" | utf8_before | utf8_after ---------------------------------+-------------+-------------- length=10**1 | 301 ns (*) | 333 ns (+11%) length=10**3 | 1.22 us (*) | 1.23 us length=10**2 | 392 ns (*) | 425 ns (+8%) length=10**4 | 8.88 us (*) | 8.88 us ---------------------------------+-------------+-------------- Total | 10.8 us (*) | 10.9 us ---------------------------------+-------------+-------------- ---------------------------------------------+-------------+----------- replace: ("a" * 99 + "\udcff" * 99) * length | utf8_before | utf8_after ---------------------------------------------+-------------+----------- length=10**1 | 2.07 us (*) | 2.08 us length=10**3 | 173 us (*) | 174 us length=10**2 | 17.6 us (*) | 17.8 us length=10**4 | 2.27 ms (*) | 2.26 ms ---------------------------------------------+-------------+----------- Total | 2.46 ms (*) | 2.46 ms ---------------------------------------------+-------------+----------- ----------------------------------------+-------------+----------- replace: ("\udcff" * 99 + "a") * length | utf8_before | utf8_after ----------------------------------------+-------------+----------- length=10**1 | 1.16 us (*) | 1.19 us length=10**3 | 81.3 us (*) | 83.7 us length=10**2 | 8.45 us (*) | 8.81 us length=10**4 | 817 us (*) | 845 us ----------------------------------------+-------------+----------- Total | 907 us (*) | 939 us ----------------------------------------+-------------+----------- ---------------------------------+-------------+-------------- replace: "\udcff" + "a" * length | utf8_before | utf8_after ---------------------------------+-------------+-------------- length=10**1 | 301 ns (*) | 335 ns (+11%) length=10**3 | 1.22 us (*) | 1.24 us length=10**2 | 384 ns (*) | 415 ns (+8%) length=10**4 | 8.97 us (*) | 9.01 us ---------------------------------+-------------+-------------- Total | 10.9 us (*) | 11 us ---------------------------------+-------------+-------------- -----------------------------------+-------------+--------------- surrogateescape: "\udcff" * length | utf8_before | utf8_after -----------------------------------+-------------+--------------- length=10**1 | 269 ns (*) | 300 ns (+11%) length=10**3 | 1.51 us (*) | 1.76 us (+17%) length=10**2 | 405 ns (*) | 445 ns (+10%) length=10**4 | 12.1 us (*) | 14.7 us (+22%) -----------------------------------+-------------+--------------- Total | 14.2 us (*) | 17.2 us (+21%) -----------------------------------+-------------+--------------- -----------------------------------------+-------------+-------------- surrogateescape: "a" * length + "\udcff" | utf8_before | utf8_after -----------------------------------------+-------------+-------------- length=10**1 | 261 ns (*) | 293 ns (+12%) length=10**3 | 1.17 us (*) | 1.18 us length=10**2 | 351 ns (*) | 383 ns (+9%) length=10**4 | 8.83 us (*) | 8.86 us -----------------------------------------+-------------+-------------- Total | 10.6 us (*) | 10.7 us -----------------------------------------+-------------+-------------- -----------------------------------------------------+-------------+-------------- surrogateescape: ("a" * 99 + "\udcff" * 99) * length | utf8_before | utf8_after -----------------------------------------------------+-------------+-------------- length=10**1 | 2.69 us (*) | 2.87 us (+7%) length=10**3 | 238 us (*) | 256 us (+8%) length=10**2 | 24.1 us (*) | 26 us (+8%) length=10**4 | 2.92 ms (*) | 3.11 ms (+7%) -----------------------------------------------------+-------------+-------------- Total | 3.19 ms (*) | 3.4 ms (+7%) -----------------------------------------------------+-------------+-------------- ------------------------------------------------+-------------+--------------- surrogateescape: ("\udcff" * 99 + "a") * length | utf8_before | utf8_after ------------------------------------------------+-------------+--------------- length=10**1 | 1.79 us (*) | 1.99 us (+11%) length=10**3 | 148 us (*) | 167 us (+13%) length=10**2 | 15 us (*) | 17 us (+13%) length=10**4 | 1.48 ms (*) | 1.68 ms (+14%) ------------------------------------------------+-------------+--------------- Total | 1.64 ms (*) | 1.87 ms (+13%) ------------------------------------------------+-------------+--------------- -----------------------------------------+-------------+-------------- surrogateescape: "\udcff" + "a" * length | utf8_before | utf8_after -----------------------------------------+-------------+-------------- length=10**1 | 260 ns (*) | 295 ns (+13%) length=10**3 | 1.17 us (*) | 1.18 us length=10**2 | 342 ns (*) | 375 ns (+10%) length=10**4 | 8.84 us (*) | 8.84 us -----------------------------------------+-------------+-------------- Total | 10.6 us (*) | 10.7 us -----------------------------------------+-------------+-------------- ---------------------------------+-------------+-------------- surrogatepass: "\udcff" * length | utf8_before | utf8_after ---------------------------------+-------------+-------------- length=10**1 | 290 ns (*) | 322 ns (+11%) length=10**3 | 2.3 us (*) | 2.31 us length=10**2 | 490 ns (*) | 525 ns (+7%) length=10**4 | 20 us (*) | 20.3 us ---------------------------------+-------------+-------------- Total | 23.1 us (*) | 23.5 us ---------------------------------+-------------+-------------- ---------------------------------------+-------------+-------------- surrogatepass: "a" * length + "\udcff" | utf8_before | utf8_after ---------------------------------------+-------------+-------------- length=10**1 | 280 ns (*) | 312 ns (+11%) length=10**3 | 1.19 us (*) | 1.2 us length=10**2 | 371 ns (*) | 404 ns (+9%) length=10**4 | 8.85 us (*) | 8.87 us ---------------------------------------+-------------+-------------- Total | 10.7 us (*) | 10.8 us ---------------------------------------+-------------+-------------- ---------------------------------------------------+-------------+----------- surrogatepass: ("a" * 99 + "\udcff" * 99) * length | utf8_before | utf8_after ---------------------------------------------------+-------------+----------- length=10**1 | 3.38 us (*) | 3.44 us length=10**3 | 305 us (*) | 312 us length=10**2 | 30.8 us (*) | 31.4 us length=10**4 | 4.05 ms (*) | 4.09 ms ---------------------------------------------------+-------------+----------- Total | 4.39 ms (*) | 4.44 ms ---------------------------------------------------+-------------+----------- ----------------------------------------------+-------------+----------- surrogatepass: ("\udcff" * 99 + "a") * length | utf8_before | utf8_after ----------------------------------------------+-------------+----------- length=10**1 | 2.56 us (*) | 2.6 us length=10**3 | 216 us (*) | 220 us length=10**2 | 22 us (*) | 22.3 us length=10**4 | 2.19 ms (*) | 2.23 ms ----------------------------------------------+-------------+----------- Total | 2.43 ms (*) | 2.47 ms ----------------------------------------------+-------------+----------- ---------------------------------------+-------------+-------------- surrogatepass: "\udcff" + "a" * length | utf8_before | utf8_after ---------------------------------------+-------------+-------------- length=10**1 | 282 ns (*) | 314 ns (+11%) length=10**3 | 1.19 us (*) | 1.2 us length=10**2 | 365 ns (*) | 397 ns (+9%) length=10**4 | 8.8 us (*) | 8.87 us ---------------------------------------+-------------+-------------- Total | 10.6 us (*) | 10.8 us ---------------------------------------+-------------+-------------- ------------------------------------+-------------+--------------- backslashreplace: "\udcff" * length | utf8_before | utf8_after ------------------------------------+-------------+--------------- length=10**1 | 1.54 us (*) | 1.18 us (-23%) length=10**3 | 6.86 us (*) | 6.68 us length=10**2 | 2.15 us (*) | 1.92 us (-11%) length=10**4 | 55.1 us (*) | 54.6 us ------------------------------------+-------------+--------------- Total | 65.7 us (*) | 64.3 us ------------------------------------+-------------+--------------- ------------------------------------------+-------------+--------------- backslashreplace: "a" * length + "\udcff" | utf8_before | utf8_after ------------------------------------------+-------------+--------------- length=10**1 | 1.51 us (*) | 1.16 us (-23%) length=10**3 | 2.44 us (*) | 2.4 us length=10**2 | 1.67 us (*) | 1.26 us (-24%) length=10**4 | 10.1 us (*) | 10.2 us ------------------------------------------+-------------+--------------- Total | 15.7 us (*) | 15 us ------------------------------------------+-------------+--------------- ------------------------------------------------------+-------------+--------------- backslashreplace: ("a" * 99 + "\udcff" * 99) * length | utf8_before | utf8_after ------------------------------------------------------+-------------+--------------- length=10**1 | 11.8 us (*) | 11.4 us length=10**3 | 1.04 ms (*) | 1.04 ms length=10**2 | 105 us (*) | 103 us length=10**4 | 10.9 ms (*) | 14.7 ms (+36%) ------------------------------------------------------+-------------+--------------- Total | 12 ms (*) | 15.9 ms (+32%) ------------------------------------------------------+-------------+--------------- -------------------------------------------------+-------------+--------------- backslashreplace: ("\udcff" * 99 + "a") * length | utf8_before | utf8_after -------------------------------------------------+-------------+--------------- length=10**1 | 11.3 us (*) | 10.4 us (-8%) length=10**3 | 972 us (*) | 935 us length=10**2 | 97.5 us (*) | 92.9 us length=10**4 | 10 ms (*) | 12.5 ms (+25%) -------------------------------------------------+-------------+--------------- Total | 11.1 ms (*) | 13.5 ms (+22%) -------------------------------------------------+-------------+--------------- ------------------------------------------+-------------+--------------- backslashreplace: "\udcff" + "a" * length | utf8_before | utf8_after ------------------------------------------+-------------+--------------- length=10**1 | 1.49 us (*) | 1.15 us (-23%) length=10**3 | 2.45 us (*) | 2.29 us (-7%) length=10**2 | 1.62 us (*) | 1.23 us (-24%) length=10**4 | 10.9 us (*) | 10.4 us ------------------------------------------+-------------+--------------- Total | 16.4 us (*) | 15.1 us (-8%) ------------------------------------------+-------------+--------------- ------------------------------------------------------+-------------+--------------- Summary | utf8_before | utf8_after ------------------------------------------------------+-------------+--------------- ignore: "\udcff" * length | 7.63 us (*) | 7.91 us ignore: "a" * length + "\udcff" | 10.7 us (*) | 10.8 us ignore: ("a" * 99 + "\udcff" * 99) * length | 2.17 ms (*) | 2.16 ms ignore: ("\udcff" * 99 + "a") * length | 843 us (*) | 866 us ignore: "\udcff" + "a" * length | 10.7 us (*) | 11 us replace: "\udcff" * length | 7.87 us (*) | 8.43 us (+7%) replace: "a" * length + "\udcff" | 10.8 us (*) | 10.9 us replace: ("a" * 99 + "\udcff" * 99) * length | 2.46 ms (*) | 2.46 ms replace: ("\udcff" * 99 + "a") * length | 907 us (*) | 939 us replace: "\udcff" + "a" * length | 10.9 us (*) | 11 us surrogateescape: "\udcff" * length | 14.2 us (*) | 17.2 us (+21%) surrogateescape: "a" * length + "\udcff" | 10.6 us (*) | 10.7 us surrogateescape: ("a" * 99 + "\udcff" * 99) * length | 3.19 ms (*) | 3.4 ms (+7%) surrogateescape: ("\udcff" * 99 + "a") * length | 1.64 ms (*) | 1.87 ms (+13%) surrogateescape: "\udcff" + "a" * length | 10.6 us (*) | 10.7 us surrogatepass: "\udcff" * length | 23.1 us (*) | 23.5 us surrogatepass: "a" * length + "\udcff" | 10.7 us (*) | 10.8 us surrogatepass: ("a" * 99 + "\udcff" * 99) * length | 4.39 ms (*) | 4.44 ms surrogatepass: ("\udcff" * 99 + "a") * length | 2.43 ms (*) | 2.47 ms surrogatepass: "\udcff" + "a" * length | 10.6 us (*) | 10.8 us backslashreplace: "\udcff" * length | 65.7 us (*) | 64.3 us backslashreplace: "a" * length + "\udcff" | 15.7 us (*) | 15 us backslashreplace: ("a" * 99 + "\udcff" * 99) * length | 12 ms (*) | 15.9 ms (+32%) backslashreplace: ("\udcff" * 99 + "a") * length | 11.1 ms (*) | 13.5 ms (+22%) backslashreplace: "\udcff" + "a" * length | 16.4 us (*) | 15.1 us (-8%) ------------------------------------------------------+-------------+--------------- Total | 41.4 ms (*) | 48.3 ms (+17%) ------------------------------------------------------+-------------+---------------