TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
韩天峰 87c7eda964 feat(compiler): implement dynamic call caching and static property resolution 2 days ago
..
bridge feat(compiler): add property access caching mechanism for Zend integration 5 days ago
dynamic-call feat(compiler): implement dynamic call caching and static property resolution 2 days ago
property-access feat(compiler): enhance call argument handling and foreach iteration performance 2 days ago
static-cache feat(compiler): implement dynamic call caching and static property resolution 2 days ago
README.md feat(compiler): add static cache optimization and late static call improvements 2 days ago
bench.php perf: use native property handlers for ordinary classes 1 week ago
micro_bench.php perf: use native property handlers for ordinary classes 1 week ago

README.md

TypePHP benchmarks

This directory contains repeatable performance workloads used to guide and verify compiler/runtime optimizations. Benchmark results depend on the CPU, PHP build, compiler, and system load, so compare PHP and TypePHP on the same machine instead of committing absolute timing expectations.

  • bench.php and micro_bench.php are the original general workloads moved from examples/.
  • bridge/ measures calls, property operations, and container operations that cross the generated-code/PHPX/Zend boundary.
  • dynamic-call/ measures monomorphic and polymorphic runtime callables so call-site cache changes can be evaluated independently from direct AOT calls.
  • property-access/ builds and compares dynamic/static property access under Zend PHP and TypePHP.
  • static-cache/ measures static-array caches and late-static method dispatch.

Run the property benchmark from the repository root:

php benchmark/property-access/run.php

The property benchmark builds the generated application with -O3 and LTO. For meaningful results, link it against a Release build of PHPX as well; a Debug/-O0 libphpx makes property helper calls several times slower and is not representative of a release package.