spebern commented on PR #3854:
URL: https://github.com/apache/arrow-rs/pull/3854#issuecomment-1476949887

   I had a closer look at `lexical` and to me, it seems that not enough of the
   functions are public to use the optimized methods.
   Sorry, I was a little too optimistic, that implementing a couple of
   trait methods might make it possible to use `lexical`'s underlying machinery.
   The macros that derive the impls are almost all private.
   
   I opened https://github.com/Alexhuszagh/rust-lexical/issues/93, because as
   it is right now, it doesn't seem to be feasible for me to implement it.
   
   For now, I see three options for continuing here:
   
   1. Merge as is
   
   2. Implement `FromLexical` for i256 without the actual optimizations from 
`lexical`
   
      Here some benchmark results for Decimal128 when using `lexical`. Note, 
that
      not everything is getting faster, but more digits definitely profit.
      
   ```
   123.123                 time:   [17.647 ns 17.713 ns 17.814 ns]
                           change: [+11.220% +11.737% +12.425%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 3 outliers among 100 measurements (3.00%)
     3 (3.00%) high severe
   
   123.1234                time:   [17.927 ns 17.977 ns 18.048 ns]
                           change: [+8.2108% +8.5561% +8.8512%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high severe
   
   123.1                   time:   [23.494 ns 23.526 ns 23.560 ns]
                           change: [+26.116% +26.332% +26.549%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   
   123                     time:   [12.598 ns 12.611 ns 12.624 ns]
                           change: [-19.372% -19.212% -19.064%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 6 outliers among 100 measurements (6.00%)
     4 (4.00%) high mild
     2 (2.00%) high severe
   
   -123.123                time:   [17.898 ns 17.917 ns 17.936 ns]
                           change: [+2.3288% +2.4573% +2.6023%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   -123.1234               time:   [18.256 ns 18.277 ns 18.299 ns]
                           change: [+0.2064% +0.5108% +0.7597%] (p = 0.00 < 
0.05)
                           Change within noise threshold.
   Found 2 outliers among 100 measurements (2.00%)
     2 (2.00%) high mild
   
   -123.1                  time:   [23.471 ns 23.511 ns 23.552 ns]
                           change: [+16.213% +16.474% +16.731%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   
   -123                    time:   [13.065 ns 13.080 ns 13.095 ns]
                           change: [-26.644% -26.545% -26.438%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   0.0000123               time:   [14.956 ns 14.975 ns 14.994 ns]
                           change: [+4.5860% +4.7599% +4.9359%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 2 outliers among 100 measurements (2.00%)
     2 (2.00%) high mild
   
   12.                     time:   [13.072 ns 13.090 ns 13.109 ns]
                           change: [-13.966% -13.509% -13.053%] (p = 0.00 < 
0.05)
                           Performance has improved.
   
   -12.                    time:   [13.506 ns 13.525 ns 13.545 ns]
                           change: [-14.013% -13.878% -13.746%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   00.1                    time:   [20.984 ns 21.023 ns 21.062 ns]
                           change: [+26.903% +27.158% +27.407%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   -00.1                   time:   [21.674 ns 21.692 ns 21.712 ns]
                           change: [+21.888% +22.153% +22.414%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 5 outliers among 100 measurements (5.00%)
     1 (1.00%) low severe
     4 (4.00%) high mild
   
   12345678912345678.1234  time:   [25.908 ns 25.932 ns 25.957 ns]
                           change: [-42.285% -42.218% -42.149%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 15 outliers among 100 measurements (15.00%)
     3 (3.00%) low mild
     5 (5.00%) high mild
     7 (7.00%) high severe
   
   -12345678912345678.1234 time:   [25.995 ns 26.030 ns 26.064 ns]
                           change: [-44.608% -44.413% -44.258%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 3 outliers among 100 measurements (3.00%)
     2 (2.00%) high mild
     1 (1.00%) high severe
   
   99999999999999999.999   time:   [24.779 ns 24.802 ns 24.828 ns]
                           change: [-44.160% -44.036% -43.927%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 9 outliers among 100 measurements (9.00%)
     8 (8.00%) high mild
     1 (1.00%) high severe
   
   -99999999999999999.999  time:   [21.675 ns 21.707 ns 21.741 ns]
                           change: [-52.810% -52.745% -52.682%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 100 measurements (2.00%)
     2 (2.00%) high mild
   
   .123                    time:   [13.940 ns 13.956 ns 13.973 ns]
                           change: [+19.897% +20.075% +20.245%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 3 outliers among 100 measurements (3.00%)
     2 (2.00%) high mild
     1 (1.00%) high severe
   
   -.123                   time:   [14.584 ns 14.598 ns 14.613 ns]
                           change: [+16.487% +16.619% +16.761%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 4 outliers among 100 measurements (4.00%)
     1 (1.00%) low mild
     3 (3.00%) high mild
   
   123.                    time:   [13.525 ns 13.546 ns 13.569 ns]
                           change: [-17.893% -17.772% -17.644%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   -123.                   time:   [14.290 ns 14.319 ns 14.346 ns]
                           change: [-17.726% -17.552% -17.384%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 7 outliers among 100 measurements (7.00%)
     6 (6.00%) low mild
     1 (1.00%) high mild
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to