Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zonuexe/bench-in_array
https://github.com/zonuexe/bench-in_array
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zonuexe/bench-in_array
- Owner: zonuexe
- License: other
- Created: 2022-11-14T13:46:59.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-30T07:46:33.000Z (12 months ago)
- Last Synced: 2024-10-27T05:43:26.305Z (about 2 months ago)
- Language: PHP
- Size: 1.25 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bench-inarray
この記事は[【PHP】処理速度測定方法 ところでin_arrayってほんとに遅いの? - Qiita](https://qiita.com/okasir4444/items/2aceed75b9ae6f488d99)にインスパイヤされました。
## 実行方法
```
composer install
php -n ./vendor/bin/phpbench run --report=all tests/Bench/
```## 結果
実行環境
```
% sw_vers
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115% sysctl machdep.cpu
machdep.cpu.cores_per_package: 8
machdep.cpu.core_count: 8
machdep.cpu.logical_per_package: 8
machdep.cpu.thread_count: 8
machdep.cpu.brand_string: Apple M1 Pro% php -nv
PHP 8.1.12 (cli) (built: Oct 30 2022 12:39:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
```![bench](img/result-m1mac-2.png)