From 0821f62f20868c6598ecbab552ad0548765ab656 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Fri, 28 Aug 2026 15:40:14 +0800 Subject: [PATCH] perf: benchmark release builds with O3 and LTO --- benchmark/README.md | 5 +++++ benchmark/property-access/project.yml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/benchmark/README.md b/benchmark/README.md index a06ac89f..a0a14e32 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -15,3 +15,8 @@ Run the property benchmark from the repository root: ```bash 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. diff --git a/benchmark/property-access/project.yml b/benchmark/property-access/project.yml index 04ced7aa..001d17ba 100644 --- a/benchmark/property-access/project.yml +++ b/benchmark/property-access/project.yml @@ -1,6 +1,7 @@ name: property_access_benchmark mode: bin -optimize: 2 +optimize: 3 +lto: true build-dir: build output: property_access sources: