Closed linlin-s closed 6 months ago
Here are the benchmark results after commit 4f4788d There is 20.62% performance improvement (timemean) on shorthand log data and 3.48%_ performance improvement(time_mean) on single nested test data.
shorthand log | file_size(B) | time_min(ns) | time_mean(ns) | memory_usage_peak(B) | |
---|---|---|---|---|---|
Before | 21270622 | 3745274325.00 | 3781944997.77 | 42696241 | |
After | 21270622 | 2960032208.40 | 3001857282.51 | 42644049 |
single nested | name | file_size(B) | time_min(ns) | time_mean(ns) | memory_usage_peak(B) |
---|---|---|---|---|---|
Before | 795 | 203792.17 | 209076.32 | 35595 | |
After | 795 | 193143.60 | 201790.09 | 29303 |
Issue #, if available: N/A
Description of changes: In this PR, we have eliminated the
PyObject_HasAttrString
condition check because thePyObject_GetAttrString
function itself checks whether the attribute exists and will return NULL if it doesn't. If thePyObject_GetAttrString
returnsNULL
, this indicates that an error has occurred, and we will handle theAttributeError
under this condition.Here is the benchmark results from benchmarking ion-python (C extension enabled) using shorthand log data. There is 21.23% performance improvement (
time_mean
) on shorthand log data and 3.35% performance improvement(time_mean
) on single nested test data.ion-python-benchmark-cli
usage pattern to reproduce the benchmark results:python ion_benchmark_cli.py write --iterations 30 --warmups 10 --io-type file test_data.ion --format ion_binary
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.