# Patch for opcode caches

- Thread: https://externals.io/message/36164
- Original archive: https://news-web.php.net/php.internals/36164
- Started by Dmitry Stogov on 2008-03-17T08:07:41+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #36164 — Dmitry Stogov — 2008-03-17T08:07:41+00:00

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

> -----Original Message-----
> From: Marcus Boerger [mailto:helly@php.net] 
> Sent: Friday, March 14, 2008 8:24 PM
> To: Stas Malyshev
> Cc: Dmitry Stogov; Andi Gutmans; phpxcache; internals@lists.php.net
> Subject: Re: [PHP-DEV] Patch for opcode caches
> 
> 
> Hello Stanislav,
> 
> Friday, March 14, 2008, 5:51:49 PM, you wrote:
> 
> > […]
> slow down. 
> > […]
> 
> > […]
> 
> > […]
> to warn the 
> > […]
> deprecating 
> > […]
> 
> > […]
> 10x faster).
> > […]
> some cases, 
> > […]
> the opcode 
> > […]
> 
> > […]
> everything can be 
> > […]
> 
> Lemme just think, doing inheritance at compile time before we 
> send the stuff to an opcode cache can be slower then?

It's always faster, but with opcode caches we cannot always do it in
compile-time, because the parent (in another file) might be changed on
next load of children class.

> How is 
> that possible? After all late binding means we do it at run 
> time. And no matter how much faster we can do it. It will 
> always be slower than doing the same thing only once.
> 
> > […]
> not be bound
> > […]
> cache means 
> > […]
> exactly what this 
> > […]
> characteristics of neither 
> > […]
> and working in 
> > […]
> 
> Inheritance cannot be done before the parent class is known. 
> We still need to do the prototype checks even if we assume 
> the class is there and insert a virtual class as parent somehow.

Right. This is the reason why we need to delay early binding. But we
don't like to delay it to run-time, because it will breake the class
creaton order and as result may breake some scripts.

Thanks. Dmitry.

---

## #36215 — Marcus Boerger — 2008-03-20T10:18:05+00:00

URL: https://externals.io/message/36164#36215 · In reply to: #36164

Hello Dmitry,

  can you please fix your mail client? You are breaking every single thread
  you reply to. Thx!

marcus

Monday, March 17, 2008, 9:07:41 AM, you wrote:



> > […]

> It's always faster, but with opcode caches we cannot always do it in
> compile-time, because the parent (in another file) might be changed on
> next load of children class.

> > […]

> Right. This is the reason why we need to delay early binding. But we
> don't like to delay it to run-time, because it will breake the class
> creaton order and as result may breake some scripts.

> Thanks. Dmitry.



Best regards,
 Marcus

---

## #36219 — Dmitry Stogov — 2008-03-20T12:16:17+00:00

URL: https://externals.io/message/36164#36219 · In reply to: #36215

I hope it must be fixed now.

Dmitry.

Marcus Boerger wrote:
> Hello Dmitry,
> 
>   can you please fix your mail client? You are breaking every single thread
>   you reply to. Thx!
> 
> marcus
> 
> Monday, March 17, 2008, 9:07:41 AM, you wrote:
> 
> 
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> 
> 
> Best regards,
>  Marcus
