klion26 commented on PR #12465:
URL: https://github.com/apache/arrow-rs/pull/12465#issuecomment-7407508704
@sdf-jkl I've update the code, please take another look when you're free
thanks.
for the perf, I benchmark locally(close all the other apps), found that the
optimization you suggestion will have 2% gain for time related types.
- `main` for master branch
- `scalar2string_with_op` your suggestion version
- `scala_time_with_op_2string`, scala and time related types &&
optimization you suggestion
- `time_plus_scala2string`, scala && time related without the optimization
you suggestion
```
group main
scalar2string_with_op scala_time_with_op_2string
scalar2string time_plus_scalar2string
----- ----
--------------------- --------------------------
------------- -----------------------
variant_get_utf8_from_date 1.00 521.3±8.28µs
? ?/sec 1.00 523.9±7.44µs ? ?/sec 1.66 865.8±14.81µs
? ?/sec 1.06 551.4±6.74µs ? ?/sec 1.69 878.8±13.71µs
? ?/sec
variant_get_utf8_from_decimal 1.00 351.2±4.78µs
? ?/sec 1.77 621.1±9.44µs ? ?/sec 1.76 616.4±12.16µs
? ?/sec 1.82 639.3±17.10µs ? ?/sec 1.80 630.8±9.52µs
? ?/sec
variant_get_utf8_from_float 1.00 333.2±5.38µs
? ?/sec 1.64 546.9±7.61µs ? ?/sec 1.67 555.6±9.88µs
? ?/sec 1.68 560.9±10.39µs ? ?/sec 1.71 570.6±13.09µs
? ?/sec
variant_get_utf8_from_int 1.00 333.7±5.03µs
? ?/sec 1.42 474.8±7.68µs ? ?/sec 1.44 479.6±8.04µs
? ?/sec 1.45 484.1±7.77µs ? ?/sec 1.46 487.9±9.98µs
? ?/sec
variant_get_utf8_from_list 1.00 435.8±8.03µs
? ?/sec 1.00 434.2±5.94µs ? ?/sec 1.04 450.1±5.04µs
? ?/sec 1.05 456.9±4.92µs ? ?/sec 1.07 465.5±5.21µs
? ?/sec
variant_get_utf8_from_map_in_list 1.00 435.5±6.41µs
? ?/sec 1.00 435.4±6.12µs ? ?/sec 1.04 450.7±4.98µs
? ?/sec 1.07 466.1±5.14µs ? ?/sec 1.07 467.7±5.21µs
? ?/sec
variant_get_utf8_from_time 1.00 692.5±13.15µs
? ?/sec 1.01 698.1±11.43µs ? ?/sec 1.54 1068.4±13.63µs
? ?/sec 1.05 724.4±9.68µs ? ?/sec 1.57 1084.2±22.10µs
? ?/sec
variant_get_utf8_from_timestamp_with_timezone 1.00 397.8±5.49µs
? ?/sec 1.01 400.4±4.61µs ? ?/sec 3.04 1210.4±24.56µs
? ?/sec 1.08 428.2±9.80µs ? ?/sec 3.10 1234.8±19.22µs
? ?/sec
variant_get_utf8_from_timestamp_without_timezone 1.00 397.6±5.52µs
? ?/sec 1.01 400.7±5.53µs ? ?/sec 2.76 1097.0±23.82µs
? ?/sec 1.07 427.1±8.73µs ? ?/sec 2.81 1119.1±19.96µs
? ?/sec
variant_get_utf8_from_unshredded_string 1.00 440.0±8.23µs
? ?/sec 1.00 439.5±9.42µs ? ?/sec 1.01 442.2±8.39µs
? ?/sec 1.00 439.5±10.20µs ? ?/sec 1.00 440.8±6.15µs
? ?/sec
```
--
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]