• Kirill Smelkov's avatar
    strconv: Move it to pyx · ca559325
    Kirill Smelkov authored
    So far this is plain code movement with no type annotations added and
    internal from-strconv imports still being done via py level.
    
    As expected this does not help practically for performance yet:
    
        name                 old time/op  new time/op  delta
        quote[a]              910µs ± 0%   805µs ± 0%  -11.54%  (p=0.008 n=5+5)
        quote[\u03b1]        1.23ms ± 0%  1.21ms ± 0%   -1.24%  (p=0.008 n=5+5)
        quote[\u65e5]         800µs ± 0%   785µs ± 0%   -1.86%  (p=0.016 n=4+5)
        quote[\U0001f64f]    1.06ms ± 1%  1.04ms ± 0%   -1.92%  (p=0.008 n=5+5)
        stdquote             1.17µs ± 0%  1.18µs ± 0%   +0.80%  (p=0.008 n=5+5)
        unquote[a]           1.33ms ± 1%  1.26ms ± 0%   -5.13%  (p=0.008 n=5+5)
        unquote[\u03b1]       952µs ± 2%   911µs ± 1%   -4.25%  (p=0.008 n=5+5)
        unquote[\u65e5]       613µs ± 2%   592µs ± 0%   -3.48%  (p=0.008 n=5+5)
        unquote[\U0001f64f]  3.62ms ± 1%  3.46ms ± 0%   -4.32%  (p=0.008 n=5+5)
        stdunquote            788ns ± 0%   812ns ± 1%   +3.07%  (p=0.016 n=4+5)
    ca559325
_strconv.pxd 1.02 KB