# realpath benchmarks

- Thread: https://externals.io/message/11548
- Original archive: https://news-web.php.net/php.internals/11548
- Started by Gareth Ardron on 2004-07-25T11:53:25+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #11548 — Gareth Ardron — 2004-07-25T11:53:25+00:00

URL: https://externals.io/message/11548#11548

OK, very very quick benchmark on the realpath stuff

System used is an AMD Opteron 142 (1.6ghz) with a gig of pc2100 ram, and
Western Digital Raptor sata disk. It's running Debian/unstable, though
only in 32bit mode atm.
Both tests were run using the standard php5 release rather than current
CVS.

test.php just runs a `passthru()` 1000 times on another script which
includes 5 files.

* before realpath modifications
root@mesa:/# time php /home/gaz/test.php
real    4m50.380s
user    1m23.635s
sys     1m22.761s

* after realpath modifications
root@mesa:/# time php /home/gaz/test.php
real    3m12.067s
user    1m22.602s
sys     1m24.608s

Now, imo, shaving over a minute and a half off that original time is
bloody impressive. Nice work, Andi.

---

## #11555 — Gareth Ardron — 2004-07-25T17:48:10+00:00

URL: https://externals.io/message/11548#11555 · In reply to: #11548

> OK, very very quick benchmark on the realpath stuff

Just as a bit of a follow-on......

> * after realpath modifications
> root@mesa:/# time php /home/gaz/test.php
> real    3m12.067s
> user    1m22.602s
> sys     1m24.608s

The above was all done on absolutle paths. I've since tried a seperate
test with the same number of includes(same files infact) - but this time
with the files in php's search path and called them via include
"dir/file.php"; much like the typical PEAR usage. This one totally
surprised me. 
root@mesa:/# time php /home/gaz/test.php
real    3m12.264s
user    1m39.049s
sys     1m23.718s

Virtually identical. Wow. Ok, I'm seriously impressed with this patch.
