14:34 < heinrich5991> how big is the penalty of an indirect call if it's always going to the same address? 14:35 <@matricks> depends on the cpu 14:35 < heinrich5991> don't they all have branch prediction nowadays? 14:35 <@matricks> yes, but it's hard to predict something that might not even be in a cache 14:35 <@matricks> immediate jumps can be predicted 14:35 < heinrich5991> yea, it might be out of cache 14:35 <@matricks> http://en.wikipedia.org/wiki/Branch_predictor#Prediction_of_indirect_jumps 14:35 < heinrich5991> do you know an approximation of the ratio of "direct call":"indirect call with branch prediction":"indirect call out of cache" 14:35 <@matricks> how much time it will take? 14:35 < heinrich5991> yes 14:35 <@matricks> direct call doesn't take any time I would guess 14:36 <@matricks> a predicted branch wouldn't take any time as well I think 14:37 <@matricks> heinrich5991: why these questions? 14:37 < heinrich5991> the predicted branch might take a perf hit because it must be ready to roll back changes? 14:38 <@matricks> it might, but I think it's marginal 14:38 <@matricks> dunno exact how that looks in modern processors 14:40 <@matricks> heinrich5991: what are you lookin' into? 14:40 < heinrich5991> rust 14:40 < heinrich5991> they keep saying that generics take less perf hit than indirect function calls 14:40 < heinrich5991> but it also creates more code that doesn't fit into the cache any more 14:40 <@matricks> yes 14:41 <@matricks> virtual vs template in c++ 14:41 < heinrich5991> i.e. they suggested me to make my class generic over files instead of using a trait object