lkml.org 
[lkml]   [2012]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 8/9] rbtree: faster augmented rbtree manipulation
From
Date
On Mon, 2012-08-06 at 14:34 -0700, Michel Lespinasse wrote:
> On Mon, Aug 6, 2012 at 7:25 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Thu, 2012-08-02 at 15:34 -0700, Michel Lespinasse wrote:
> >> +struct rb_augment_callbacks {
> >> + void (*propagate)(struct rb_node *node, struct rb_node *stop);
> >> + void (*copy)(struct rb_node *old, struct rb_node *new);
> >> + void (*rotate)(struct rb_node *old, struct rb_node *new);
> >> +};
> >
> > Should we make that const pointers? Daniel?
>
> I don't think it would hurt, but note that each function taking this
> as an argument takes it as a const struct rb_augment_callbacks *, so I
> doubt the extra consts would help either.

IIRC Daniel found it allowed some older GCC to inline more if the
function pointer itself was constant.


\
 
 \ /
  Last update: 2012-08-07 00:21    [W:0.063 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site