{"id":15525101,"url":"https://github.com/staabm/php-phardata-benchmark","last_synced_at":"2025-06-25T22:06:30.990Z","repository":{"id":56180054,"uuid":"315019614","full_name":"staabm/php-phardata-benchmark","owner":"staabm","description":"Repro Script for PHP-SRC Bug #80399","archived":false,"fork":false,"pushed_at":"2020-11-23T12:31:28.000Z","size":1791,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T11:39:12.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bugs.php.net/bug.php?id=80399","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/staabm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T11:19:55.000Z","updated_at":"2020-11-23T12:31:31.000Z","dependencies_parsed_at":"2022-08-15T14:10:37.649Z","dependency_job_id":null,"html_url":"https://github.com/staabm/php-phardata-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/staabm/php-phardata-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staabm%2Fphp-phardata-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staabm%2Fphp-phardata-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staabm%2Fphp-phardata-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staabm%2Fphp-phardata-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/staabm","download_url":"https://codeload.github.com/staabm/php-phardata-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staabm%2Fphp-phardata-benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261960542,"owners_count":23236574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:54:42.433Z","updated_at":"2025-06-25T22:06:30.971Z","avatar_url":"https://github.com/staabm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repo contains [a repro-benchmark](https://github.com/staabm/php-phardata-benchmark/blob/master/bench.php) to show how slow PharData is compared to a simple userland library.\n\nwe see PharData beeing roughly 10x slower then the userland library [splitbrain/php-archive](https://github.com/splitbrain/php-archive).\n\n## profilled using blackfire\n\n```bash\nblackfire run php bench.php\n\nStart using PharData\nduration: 0.68688011169434\n\n\nStart using splitbrain/php-archive\nduration: 0.25864601135254\n\n\nMemory       1.22MB\nWall Time     992ms\nI/O Wait      581ms\nCPU Time      412ms\nNetwork         n/a     n/a     n/a\nSQL             n/a     n/a\n\n```\n\n![image](https://user-images.githubusercontent.com/47448731/99962209-0fe2e280-2d90-11eb-825a-77038a0447bf.png)\n\n\n## See the following testruns on my windows10 x64 notebook:\n\n```bash\n$ php -v\nPHP 7.3.0 (cli) (built: Dec  6 2018 02:17:00) ( ZTS MSVC15 (Visual C++ 2017) x86 )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies\n    with blackfire v1.24.1~win-x32-zts73, https://blackfire.io, by Blackfire\n\n\n$ php bench.php\nStart using PharData\nduration: 1.5862009525299\n\n\nStart using splitbrain/php-archive\nduration: 0.076961040496826\n\n$ php bench.php\nStart using PharData\nduration: 1.0293560028076\n\n\nStart using splitbrain/php-archive\nduration: 0.083132982254028\n\n$ php bench.php\nStart using PharData\nduration: 0.99211502075195\n\n\nStart using splitbrain/php-archive\nduration: 0.096863985061646\n\n$ php bench.php\nStart using PharData\nduration: 1.0401749610901\n\n\nStart using splitbrain/php-archive\nduration: 0.088247776031494\n```\n\nthe same is true when GZIP is activated.\n\n## Results on MacBook Pro with macOS 11.0.1:\n\n```bash\n$ php -v\nPHP 7.4.12 (cli) (built: Oct 29 2020 18:37:21) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0, Copyright (c) Zend Technologies\n    with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies\n    with blackfire v1.44.0~mac-x64-non_zts74, https://blackfire.io, by Blackfire\n\n\n$ php bench.php\nStart using PharData\nduration: 0.23402190208435\n\n\nStart using splitbrain/php-archive\nduration: 0.036140918731689\n\n$ php bench.php\nStart using PharData\nduration: 0.30424404144287\n\n\nStart using splitbrain/php-archive\nduration: 0.024400949478149\n\n$ php bench.php\nStart using PharData\nduration: 0.30759882926941\n\n\nStart using splitbrain/php-archive\nduration: 0.024186849594116\n\n$ php bench.php\nStart using PharData\nduration: 0.28332209587097\n\n\nStart using splitbrain/php-archive\nduration: 0.022264003753662\n```\n\n## tested on ubuntu20\n\n```bash\n$ php -v\nPHP 7.4.12 (cli) (built: Oct 31 2020 17:04:25) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0, Copyright (c) Zend Technologies\n    with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies\n    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans\n    with blackfire v1.44.0~linux-x64-non_zts74, https://blackfire.io, by Blackfire\n\n\n$ php bench.php\nStart using PharData\nduration: 0.68476390838623\n\n\nStart using splitbrain/php-archive\nduration: 0.048066854476929\n\n$ php bench.php\nStart using PharData\nduration: 0.68217706680298\n\n\nStart using splitbrain/php-archive\nduration: 0.045325040817261\n\n```\n\n## tested on ubuntu18\n\n```bash\nphp -v\nPHP 7.2.34-2+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 10 2020 19:44:20) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\n    with Zend OPcache v7.2.34-2+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies\n    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans\n    with blackfire v1.44.0~linux-x64-non_zts72, https://blackfire.io, by Blackfire\n\nk$ php bench.php\nStart using PharData\nduration: 0.7270200252533\n\n\nStart using splitbrain/php-archive\nduration: 0.055887937545776\n\n\n$ php bench.php\nStart using PharData\nduration: 0.69905304908752\n\n\nStart using splitbrain/php-archive\nduration: 0.054063081741333\n\n\n$ php bench.php\nStart using PharData\nduration: 0.64250612258911\n\n\nStart using splitbrain/php-archive\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaabm%2Fphp-phardata-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaabm%2Fphp-phardata-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaabm%2Fphp-phardata-benchmark/lists"}