Skip to content

2 to 3#54

Merged
dbu merged 4 commits into3.xfrom
2-to-3
Apr 27, 2026
Merged

2 to 3#54
dbu merged 4 commits into3.xfrom
2-to-3

Conversation

@dbu
Copy link
Copy Markdown
Member

@dbu dbu commented Apr 27, 2026

No description provided.

brutal-factories and others added 4 commits April 27, 2026 13:44
…ry filesystem checks for better performance

we use function_exist before building the filename and checking if it
exists. this gives a significant performance improvement when working
with many objects of the same class.
we considered an array cache of the function name, which seems to be
faster still than the function_exists call, but not enough to justify
the added complexity.

numbers with 5M objects of the same type:

Serialization timings
conditions 	Timing (in ms) 	Improvement 	XHProf samplings
2.x 	32'336 	---- 	serialize_singles.xhprof.txt
2.x + opcache 	17'862 	-44.8% 	serialize_singles.xhprof.txt
with caching 	12'929 	-60.0% 	serialize_singles.xhprof.txt
with caching +opcache 	11'980 	-63.0% 	serialize_singles.xhprof.txt

function_exists instead of cache: +10.90%

Deserialization timings
conditions 	Timing (in ms) 	Improvement 	XHProf samplings
2.x 	25'983 	---- 	deserialize_singles.xhprof
2.x + opcache 	12'600 	-51.5% 	deserialize_singles.xhprof.txt
with caching 	7'791 	-70.0% 	deserialize_singles.xhprof.txt
with caching + opcache 	7'450 	-71.3% 	deserialize_singles.xhprof.txt

function_exists instead of cache: +9.15%
@dbu dbu merged commit f9e9b45 into 3.x Apr 27, 2026
8 checks passed
@dbu dbu deleted the 2-to-3 branch April 27, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants