mbox series

[0/5] some list optimizations

Message ID 20180725204441.91527-1-luc.vanoostenryck@gmail.com (mailing list archive)
Headers show
Series some list optimizations | expand

Message

Luc Van Oostenryck July 25, 2018, 8:44 p.m. UTC
This series contains optimizations of some list operations.

In most common situations, most list used are quite small
(mean of 5 elements) and these optimizations don't give
any kind of measureable speedups (but no slowdowns either).
However, in some (maybe pathological) situations, the lists
can be quite long, especially the ones for pseudo usage, and
then these optimizations can be quite effective: up to a
combined speedup of 45%.

Note: I'm not yet 100% convinced that patch 5 is totally safe.
Note: the 'speedup' of patches 3 & 4 is lost in the noise.


This series is available for review & testing in the Git repository at:
  git://github.com/lucvoo/sparse-dev.git list-optims-v2


Changes since v1 (thanks to Ramsay Jones):
* rewrote initial test in copy_ptr_list()
* better variable name in copy_ptr_list()'s loop
* improved commit messages
* fix typos in autodoc's markup

----------------------------------------------------------------

Luc Van Oostenryck (5):
  add copy_ptr_list()
  add ptr_list_empty()
  add ptr_list_multiple()
  add lookup_ptr_list_entry()
  no VOID test in convert_instruction_target()

 flow.c      |   7 +---
 linearize.h |  17 +++++++-
 liveness.c  |   9 -----
 ptrlist.c   | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 ptrlist.h   |   5 +++
 simplify.c  |   4 +-
 6 files changed, 135 insertions(+), 17 deletions(-)