hzuo commented on PR #12793:
URL: https://github.com/apache/arrow/pull/12793#issuecomment-1088232577
Ok sweet, yeah scoping to only string tests, the performance is actually
pretty stable across 5 runs. Looks this PR is consistently 30% faster than
master!
### On master
```
❯ git branch -v
hz/dp 7f1cb70ed speed up getVariableWidthBytes
* master 7a3bb0dd1 ARROW-16110: [C++] GcsFileSystem::Make ignores IOContext
arrow/js on 🌱 master [!] is 📦 v8.0.0-SNAPSHOT via 🤖 v16.14.2
❯ for i in {1..5}; do yarn perf; done
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:35293) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 891.8ms
Running "Iterate Vector" suite...
from: string 2.78 ops/s ±3.7%, 364 ms, 11 samples
Running "Spread Vector" suite...
from: string 2.58 ops/s ±2.5%, 390 ms, 11 samples
Running "toArray Vector" suite...
from: string 2.63 ops/s ±1.7%, 382 ms, 11 samples
Running "get Vector" suite...
from: string 3.52 ops/s ±5.7%, 282 ms, 13 samples
✨ Done in 37.73s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:35304) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 898.588ms
Running "Iterate Vector" suite...
from: string 2.73 ops/s ±4.1%, 371 ms, 11 samples
Running "Spread Vector" suite...
from: string 2.49 ops/s ±3.1%, 404 ms, 11 samples
Running "toArray Vector" suite...
from: string 2.58 ops/s ±2.3%, 392 ms, 11 samples
Running "get Vector" suite...
from: string 3.49 ops/s ±6.0%, 276 ms, 13 samples
✨ Done in 38.39s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:35308) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 900.138ms
Running "Iterate Vector" suite...
from: string 2.79 ops/s ±3.7%, 365 ms, 11 samples
Running "Spread Vector" suite...
from: string 2.58 ops/s ±3.3%, 384 ms, 11 samples
Running "toArray Vector" suite...
from: string 2.62 ops/s ±1.6%, 382 ms, 11 samples
Running "get Vector" suite...
from: string 3.55 ops/s ±6.2%, 271 ms, 13 samples
✨ Done in 37.60s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:35313) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 890.689ms
Running "Iterate Vector" suite...
from: string 2.76 ops/s ±3.5%, 369 ms, 11 samples
Running "Spread Vector" suite...
from: string 2.48 ops/s ±2.3%, 403 ms, 11 samples
Running "toArray Vector" suite...
from: string 2.56 ops/s ±2.6%, 394 ms, 11 samples
Running "get Vector" suite...
from: string 3.51 ops/s ±6.0%, 277 ms, 13 samples
✨ Done in 38.24s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:35316) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 905.984ms
Running "Iterate Vector" suite...
from: string 2.81 ops/s ±3.8%, 360 ms, 11 samples
Running "Spread Vector" suite...
from: string 2.52 ops/s ±2.4%, 399 ms, 11 samples
Running "toArray Vector" suite...
from: string 2.54 ops/s ±2.7%, 395 ms, 11 samples
Running "get Vector" suite...
from: string 3.5 ops/s ±6.2%, 274 ms, 13 samples
✨ Done in 38.20s.
```
---
## This PR
```
❯ git branch -v
* hz/dp 7f1cb70ed speed up getVariableWidthBytes
master 7a3bb0dd1 ARROW-16110: [C++] GcsFileSystem::Make ignores IOContext
arrow/js on 🌱 hz/dp [!] is 📦 v8.0.0-SNAPSHOT via 🤖 v16.14.2
❯ for i in {1..5}; do yarn perf; done
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:34959) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 896.896ms
Running "Iterate Vector" suite...
from: string 3.61 ops/s ±6.4%, 267 ms, 13 samples
Running "Spread Vector" suite...
from: string 3.47 ops/s ±6.3%, 289 ms, 13 samples
Running "toArray Vector" suite...
from: string 3.36 ops/s ±5.9%, 290 ms, 13 samples
Running "get Vector" suite...
from: string 3.44 ops/s ±4.6%, 279 ms, 13 samples
✨ Done in 35.45s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:34964) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 901.415ms
Running "Iterate Vector" suite...
from: string 3.65 ops/s ±5.5%, 269 ms, 14 samples
Running "Spread Vector" suite...
from: string 3.42 ops/s ±6.7%, 299 ms, 13 samples
Running "toArray Vector" suite...
from: string 3.53 ops/s ±6.0%, 282 ms, 13 samples
Running "get Vector" suite...
from: string 3.52 ops/s ±3.4%, 280 ms, 13 samples
✨ Done in 35.54s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:34967) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 898.33ms
Running "Iterate Vector" suite...
from: string 3.66 ops/s ±5.8%, 265 ms, 14 samples
Running "Spread Vector" suite...
from: string 3.42 ops/s ±5.8%, 294 ms, 13 samples
Running "toArray Vector" suite...
from: string 3.56 ops/s ±7.1%, 272 ms, 13 samples
Running "get Vector" suite...
from: string 3.53 ops/s ±3.6%, 280 ms, 13 samples
✨ Done in 35.54s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:34970) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 901.96ms
Running "Iterate Vector" suite...
from: string 3.61 ops/s ±6.1%, 273 ms, 13 samples
Running "Spread Vector" suite...
from: string 3.43 ops/s ±5.9%, 298 ms, 13 samples
Running "toArray Vector" suite...
from: string 3.43 ops/s ±7.1%, 280 ms, 13 samples
Running "get Vector" suite...
from: string 3.47 ops/s ±4.6%, 277 ms, 13 samples
✨ Done in 35.36s.
yarn run v1.22.18
$ node --loader ts-node/esm/transpile-only ./perf/index.ts
(node:34973) ExperimentalWarning: --experimental-loader is an experimental
feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Prepare Data: 884.961ms
Running "Iterate Vector" suite...
from: string 3.66 ops/s ±5.7%, 265 ms, 14 samples
Running "Spread Vector" suite...
from: string 3.45 ops/s ±6.6%, 306 ms, 13 samples
Running "toArray Vector" suite...
from: string 3.49 ops/s ±5.5%, 285 ms, 13 samples
Running "get Vector" suite...
from: string 3.54 ops/s ±4.5%, 271 ms, 13 samples
✨ Done in 35.33s.
```
--
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]