rfc:tsrmls-fetch-reduction
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:tsrmls-fetch-reduction [2010/09/09 23:54] – link to patch felipe | rfc:tsrmls-fetch-reduction [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2010-09-09 | * Date: 2010-09-09 | ||
- | * Author: Felipe Pena < | + | * Author: Felipe Pena <felipe@php.net>, |
- | * Status: Under Discussion | + | * Status: Under implementation |
===== Introduction ===== | ===== Introduction ===== | ||
- | The purpose of RFC is to show a way to reduce several function call by avoiding useless TSRMLS_FETCH() usage on ZTS. | + | The purpose of RFC is to show a way to reduce several function call by avoiding useless TSRMLS_FETCH() usage on ZTS. Adding TSRMLS_CC to the memory allocation macros/ |
===== Changes ====== | ===== Changes ====== | ||
- | |||
- | The main goal was to create a new version of each memory allocation function/ | ||
See below some macros/ | See below some macros/ | ||
^ Current function/ | ^ Current function/ | ||
- | | emalloc | + | | emalloc |
- | | ecalloc | + | | ecalloc |
- | | pemalloc | + | | pemalloc |
- | | erealloc | + | | erealloc |
- | | efree | efreets | + | | efree | efree2 |
- | | estrdup | + | | estrdup |
- | | estrndup | + | | estrndup |
- | | ALLOC_INIT_ZVAL | + | |
- | | SEPARATE_ZVAL | + | ===== Profiler ===== |
- | | SEPARATE_ZVAL_IF_NOT_REF | + | |
- | | SEPARATE_ZVAL_TO_MAKE_IS_REF | + | Using cachegrind (//valgrind --tool=cachegrind --cachegrind-out-file=profile sapi/ |
+ | |||
+ | ^ Function ^ Ir (Patched) ^ Ir (Current) ^ | ||
+ | | pthread_getspecific | ||
+ | | ts_resource_ex | ||
+ | | efree | 459, | ||
+ | |||
+ | ^ Ir Total (Patched) ^ Ir Total (Current) ^ | ||
+ | | 42, | ||
+ | |||
+ | // Ir - Instruction read // | ||
===== Benchmark ===== | ===== Benchmark ===== | ||
Line 92: | Line 100: | ||
</ | </ | ||
- | **Non-patched** | + | **Current (trunk)** |
< | < | ||
empty_loop | empty_loop | ||
Line 129: | Line 137: | ||
</ | </ | ||
- | ===== Proposal and Patch ===== | + | ===== Patch ===== |
http:// | http:// |
rfc/tsrmls-fetch-reduction.1284076490.txt.gz · Last modified: 2017/09/22 13:28 (external edit)