Project

General

Profile

Actions

Feature #5789

closed

Optimize st_table

Added by funny_falcon (Yura Sokolov) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I prepared couple of patches to optimize st_table performance.

First patch (st_func.patch) is a trivial translation of some macroses to functions,
but it gives ~4% of improvement on gcc-4.5.2 32bit (sorry for not testing other environments).

Second patch (st_pack_table) provides packing for tables sized upto 12 entries.
It gives countable memory footprint reduction and measurable performance improvement
(~8% compared to trunk, ~4% compared to st_func.patch).
Note: synthetic benchmark could show some performance degradation, so that there
could be some exotic workload, which suffer from patch.
But realworld application (and even make check) runs uniformly faster.

Correlated github pull requests are https://github.com/ruby/ruby/pull/70 and https://github.com/ruby/ruby/pull/71


Files

st_func.patch (12.6 KB) st_func.patch rewrite some macroses to functions funny_falcon (Yura Sokolov), 12/22/2011 06:34 PM
st_pack_tables.patch (20.9 KB) st_pack_tables.patch allow usual tables to be packed funny_falcon (Yura Sokolov), 12/22/2011 06:34 PM
st_pack_tables.patch (20.8 KB) st_pack_tables.patch allow usual tables to be packed (+tiny fix) funny_falcon (Yura Sokolov), 12/22/2011 07:02 PM
st_pool_alloc.patch (21.7 KB) st_pool_alloc.patch use pool allocation for parts of hash funny_falcon (Yura Sokolov), 12/28/2011 06:52 PM
st_pool_alloc_pack.patch (31.5 KB) st_pool_alloc_pack.patch use pool allocation + pack tables up to 6 entries funny_falcon (Yura Sokolov), 12/31/2011 02:52 PM
st_pool_alloc_pack.patch (31.6 KB) st_pool_alloc_pack.patch use pool allocation + pack tables up to 6 entries (+ bug fix) funny_falcon (Yura Sokolov), 12/31/2011 03:07 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0