You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2023/08/17 22:26:39 UTC
[GitHub] [arrow-nanoarrow] WillAyd opened a new pull request, #280: pef: Improved Bit Unpacking Performance
WillAyd opened a new pull request, #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280
I was very surprised by this but getting rid of the shifting yielded a huge performance boost for me locally. I was benchmarking some pandas code that took ~500us to unpack 1 million boolean values - with this simple change that time fell to ~30us
Not an expert in assembly but here is what godbolt produces to set the index of 1 before:
```asm
movzx eax, BYTE PTR [rbp-1]
shr al
mov edx, eax
.loc 1 6 6
mov rax, QWORD PTR [rbp-32]
add rax, 1
.loc 1 6 24
and edx, 1
.loc 1 6 10
mov BYTE PTR [rax], dl
```
and after:
```asm
movzx eax, BYTE PTR [rbp-1]
and eax, 2
.loc 1 6 25
test eax, eax
setne dl
.loc 1 6 6
mov rax, QWORD PTR [rbp-32]
add rax, 1
.loc 1 6 10
mov BYTE PTR [rax], dl
```
Assuming the `shr` instruction is inefficient compared to the `test` / `setne` approach taken in the latter
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1689235750
That is an interesting find! Though I wonder since the macro makes a difference - if you compiled with `-Winline` did you see any errors about the arrow functions not getting inline'd? You'd have to sift through some Cython warnings/errors in the project I provided, but that may be part of the reason why a macro helps
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688848056
Oh whoops, I read that backward. Yes, apparently without the shifts the packing is much slower for me.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1689124104
Yes, I'm on M1.
If I change the unpacking to a macro, I get 3x faster unpacking (and no difference between shift/no shift):
```c
#define ARROW_BITS_UNPACK1(word, out) \
do { \
out[0] = (word >> 0) & 1; \
out[1] = (word >> 1) & 1; \
out[2] = (word >> 2) & 1; \
out[3] = (word >> 3) & 1; \
out[4] = (word >> 4) & 1; \
out[5] = (word >> 5) & 1; \
out[6] = (word >> 6) & 1; \
out[7] = (word >> 7) & 1; \
} while(0)
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: pef: Improved Bit Unpacking Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683076424
Haven't profiled the packing methods yet but I assume we stand to gain a bit removing the left shift operators there as well
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] jorisvandenbossche commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688780337
FWIW I quickly cloned your repo and followed the instructions there, and I see similar results as you (big difference between `unpack` and `unpack_no_shift`, 1.36ms vs 140µs, so also around 10x difference)
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688843028
Hmm strange. So for you the packing without shifts is slower? I see 142 us going up to 203?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] codecov-commenter commented on pull request #280: pef: Improved Bit Unpacking Performance
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683059137
## [Codecov](https://app.codecov.io/gh/apache/arrow-nanoarrow/pull/280?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#280](https://app.codecov.io/gh/apache/arrow-nanoarrow/pull/280?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (4e175a1) into [main](https://app.codecov.io/gh/apache/arrow-nanoarrow/commit/ad83497bc8daaec17005fa92b8690c97195bef52?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ad83497) will **increase** coverage by `1.13%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## main #280 +/- ##
==========================================
+ Coverage 87.10% 88.23% +1.13%
==========================================
Files 66 3 -63
Lines 10226 357 -9869
==========================================
- Hits 8907 315 -8592
+ Misses 1319 42 -1277
```
[see 63 files with indirect coverage changes](https://app.codecov.io/gh/apache/arrow-nanoarrow/pull/280/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] jorisvandenbossche commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688896563
(I am on ubuntu / intel cpu)
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: pef: Improved Bit Unpacking Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683873167
Hmm very strange. I also pieced together this benchmark in C:
```c
#include <stdlib.h>
#include "nanoarrow.h"
#include "buffer_inline.h"
int main() {
int N = 1000000;
int8_t* values = malloc(N);
memset(values, 0, N);
struct ArrowBitmap bitmap;
ArrowBitmapInit(&bitmap);
ArrowBitmapReserve(&bitmap, N);
ArrowBitmapAppendInt8Unsafe(&bitmap, values, N);
for (int i = 0; i < 10000; i++) {
ArrowBitsUnpackInt8(bitmap.buffer.data, 0, N, values);
}
free(values);
}
```
which I think generally showed improvement, but not to the degree and consistency with what I was seeing in the Python/Cython library I originally noticed this in. Will see if I can test some more
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: Improved Bit (Un)packing Performance [arrow-nanoarrow]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot merged PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: pef: Improved Bit Unpacking Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683166773
Cool observation!
For what it's worth, I wasn't able to observe a difference on MacOS M1 or x86/AMD Ryzen 5 (although I'm benchmarking via the R package, which unpacks into 32-bit integers and not 8-bit integers).
With nanoarrow 0.2.0:
``` r
# install.packages("nanoarrow")
library(nanoarrow)
lgls <- nanoarrow:::vec_gen(logical(), 1e6)
bool_array <- as_nanoarrow_array(lgls)
bool_array_arrow <- arrow::as_arrow_array(bool_array)
bench::mark(
convert_array(bool_array, logical()),
as.vector(bool_array_arrow),
as.logical(lgls)
)
#> # A tibble: 3 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch> <bch:> <dbl> <bch:byt> <dbl>
#> 1 convert_array(bool_array, logical()) 560µs 735µs 1.33e3 3.82MB 154.
#> 2 as.vector(bool_array_arrow) 568µs 782µs 1.28e3 3.82MB 141.
#> 3 as.logical(lgls) 0 0 4.32e8 0B 0
```
With nanoarrow on main:
``` r
# pak::pak("apache/arrow-nanoarrow/r")
library(nanoarrow)
lgls <- nanoarrow:::vec_gen(logical(), 1e6)
bool_array <- as_nanoarrow_array(lgls)
bool_array_arrow <- arrow::as_arrow_array(bool_array)
bench::mark(
convert_array(bool_array, logical()),
as.vector(bool_array_arrow),
as.logical(lgls)
)
#> # A tibble: 3 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch> <bch:> <dbl> <bch:byt> <dbl>
#> 1 convert_array(bool_array, logical()) 105µs 316µs 3.08e3 3.82MB 350.
#> 2 as.vector(bool_array_arrow) 558µs 778µs 1.29e3 3.82MB 143.
#> 3 as.logical(lgls) 0 1ns 2.94e8 0B 0
```
With this PR:
``` r
# Local build of this branch
library(nanoarrow)
lgls <- nanoarrow:::vec_gen(logical(), 1e6)
bool_array <- as_nanoarrow_array(lgls)
bool_array_arrow <- arrow::as_arrow_array(bool_array)
bench::mark(
convert_array(bool_array, logical()),
as.vector(bool_array_arrow),
as.logical(lgls)
)
#> # A tibble: 3 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch> <bch:> <dbl> <bch:byt> <dbl>
#> 1 convert_array(bool_array, logical()) 105µs 316µs 3.08e3 3.82MB 350.
#> 2 as.vector(bool_array_arrow) 558µs 778µs 1.29e3 3.82MB 143.
#> 3 as.logical(lgls) 0 1ns 2.94e8 0B 0
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit Unpacking Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688662632
I set up a repo to compare this from Cython:
https://github.com/WillAyd/cython-nanoarrow
The benchmarks for me look something like this:
```python
In [1]: from comparisons import ComparisonManager
...: mgr = ComparisonManager()
...: %timeit mgr.unpack()
...: %timeit mgr.unpack_no_shift()
547 µs ± 21 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
40.5 µs ± 321 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
```
Not sure what makes Python here different than the R / C benchmarks we've tried before...
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688866634
Are you on an intel or m1 chip? Guessing that could explain some of the differences. Interesting to see all this variation...
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: Improved Bit (Un)packing Performance [arrow-nanoarrow]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1750684511
> does this program generate any difference for you?
With my (apple aarch64) `clang`, the compiler correctly deduces that it can do all the work at compile time and gives me a time of zero for both! (Except at `-O0`, where it gives me slightly better timing for the 'no shifts' option).
Either way I'm happy to merge this (perhaps with a rebase to clear up the CI). In the unlikely event I discover any performance regression I'm happy to revisit.
I did try briefly my macro approach before 0.3.0 to see if that could be a quick win, but it seemed to *decrease* performance in the R package for the "unpack 32" case in my first benchmark so I moved on to other things.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit Unpacking Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683999750
For reference here is a "shiftless" packing implementation too, though I haven't seen as much speed up using this:
```c
static inline void _ArrowBitmapPackInt8(const int8_t* values, uint8_t* out) {
*out = (values[0]
| ((values[1] + 0x1) & 0x2)
| ((values[2] + 0x3) & 0x4)
| ((values[3] + 0x7) & 0x8)
| ((values[4] + 0xf) & 0x10)
| ((values[5] + 0x1f) & 0x20)
| ((values[6] + 0x3f) & 0x40)
| ((values[7] + 0x7f) & 0x80)
);
}
```
I am still testing these downstream so no rush to merge this - let me see if anything becomes clearer as I work through this in pandas and will report back
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] WillAyd commented on pull request #280: perf: Improved Bit Unpacking Performance
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688759144
On the writing side of things my benchmarks shows ~10% improvement not using shift. Not as drastic as read, but still maybe worthwhile
```python
In [2]: from comparisons import ComparisonManager
...: mgr = ComparisonManager()
...: %timeit mgr.pack()
...: %timeit mgr.pack_no_shift()
80.1 µs ± 984 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
72.8 µs ± 390 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
In [3]: from comparisons import ComparisonManager
...: mgr = ComparisonManager()
...: %timeit mgr.pack()
...: %timeit mgr.pack_no_shift()
78.9 µs ± 671 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
71.5 µs ± 195 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
In [4]: from comparisons import ComparisonManager
...: mgr = ComparisonManager()
...: %timeit mgr.pack()
...: %timeit mgr.pack_no_shift()
80.4 µs ± 324 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
72.2 µs ± 272 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: Improved Bit (Un)packing Performance [arrow-nanoarrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1750620993
@paleolimbot does this program generate any difference for you? Regardless of if compiled with clang or gcc, I get a 2x speedup at -O3 optimization without shifts:
```c
#include <stdio.h>
#include <inttypes.h>
#include <time.h>
#define NANOSEC_PER_SEC 1000000000LL
static inline void UnpackInt8Shifts(const uint8_t word, int8_t* out) {
out[0] = (word >> 0) & 1;
out[1] = (word >> 1) & 1;
out[2] = (word >> 2) & 1;
out[3] = (word >> 3) & 1;
out[4] = (word >> 4) & 1;
out[5] = (word >> 5) & 1;
out[6] = (word >> 6) & 1;
out[7] = (word >> 7) & 1;
}
static inline void UnpackInt8NoShifts(const uint8_t word, int8_t* out) {
out[0] = (word & 0x1) != 0;
out[1] = (word & 0x2) != 0;
out[2] = (word & 0x4) != 0;
out[3] = (word & 0x8) != 0;
out[4] = (word & 0x10) != 0;
out[5] = (word & 0x20) != 0;
out[6] = (word & 0x40) != 0;
out[7] = (word & 0x80) != 0;
}
int main(void) {
const size_t niters = 100000000;
const uint8_t word = 0xaa;
int8_t out[8];
struct timespec start, end;
clock_gettime(CLOCK_REALTIME, &start);
for (size_t i = 0; i < niters; i++) {
UnpackInt8Shifts(word, out);
}
clock_gettime(CLOCK_REALTIME, &end);
printf("ns duration of UnpackInt8Shifts was: %lld\n", (end.tv_sec * NANOSEC_PER_SEC + end.tv_nsec) - (start.tv_sec * NANOSEC_PER_SEC + start.tv_nsec));
clock_gettime(CLOCK_REALTIME, &start);
for (size_t i = 0; i < niters; i++) {
UnpackInt8NoShifts(word, out);
}
clock_gettime(CLOCK_REALTIME, &end);
printf("ns duration of UnpackInt8NoShifts was: %lld\n", (end.tv_sec * NANOSEC_PER_SEC + end.tv_nsec) - (start.tv_sec * NANOSEC_PER_SEC + start.tv_nsec));
return 0;
}
```
Still worthwhile though I'm not sure how the 2x speedup in the base benchmark yet results in a 15x speedup in the Python benchmark on my platform
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: pef: Improved Bit Unpacking Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1683900005
If this change helps even a little I'm certainly in favour of merging...it may be that it helps some compilers/compiler flag combinations do some optimizations. You could also try making `_ArrowBitsUnpackInt8()` a macro (then you'd only need one for int8 and int32).
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688849511
FWIW I also had to compile slightly differently because I got a bunch of missing symbol errors.
```
gcc -O3 -Wall -Werror -shared -fPIC \
-I$(python -c "import sysconfig; print(sysconfig.get_paths()['include'])") \
-L/Library/Frameworks/Python.framework/Versions/3.11/lib -lpython3.11 \
comparisons.c nanoarrow.c -o comparisons.so
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #280: perf: Improved Bit (Un)packing Performance
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688836990
The difference is more subtle for me on packing (but more pronounced for packing)...I'm game!
Can you add a comment above each hard-coded shift and explain that it was done for performance reasons?
<img width="549" alt="Screenshot 2023-08-22 at 4 50 49 PM" src="https://github.com/apache/arrow-nanoarrow/assets/10995762/185a3430-fb9e-4807-ae6f-0d3344c1548c">
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org