ZEND_VM_HOT is ZEND_COLD?

From: Date: Wed, 30 Mar 2022 10:00:02 +0000
Subject: ZEND_VM_HOT is ZEND_COLD?
Groups: php.internals 
Request: Send a blank email to internals+get-117450@lists.php.net to get a copy of this message
Dear PHP Internals, I am looking at zend_vm_execute.h file and found some lines of code which I do not quite get. Who can help tell that why we should have ZEND_COLD attribute in ZEND_VM_HOT line definition, or I can simply ignore it as it is trivial? Thanks. # if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) // # define ZEND_COLD __attribute__((cold)) # define ZEND_VM_HOT zend_always_inline ZEND_COLD ZEND_OPT_SIZE # define ZEND_VM_COLD ZEND_COLD ZEND_OPT_SIZE Here is one use of this macro in function declaration. static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) ======================================= Tony Su (Su, Tao) make a 'lazy' programmer diligently with efficiency

« previous php.internals (#117450) next »