<div dir="ltr">Hi Max and Tom,<br><br>> why do we need to optimize current implementation further?<br>> Is it just for the sake of aesthetics and fun of it?<br><br>You are right, this is for the sake of aesthetics. I had a<br>task: to take some dead code from mailing lists, to make it<br>satisfy    the Osmocom coding requirements and merge it part by<br>part. There was some warnings about object visibility (fixed),<br>about naming convention (fixed) and about memory allocation.<br><br>In the past, the discussion about memory allocation was set<br>aside, until code is merged. So, till now, this task remained<br>in my mind as some kind of unfinished work...<br><br>> Do we have some profiling result showing that in scenario<br>> A Viterbi decoder occupies XX% of the time?<br><br>I am not sure that we can profile different parts of code<br>without actual modifications (probably perf can do that,<br>correct me otherwise). But we can profile a whole<br>implementation using the benchmark code from Tom, which<br>I mentioned before.<br><br>> Don't get me wrong - I'm not against optimizations,<br>> just would like to know more about the general context.<br><br>It's ok, I am always happy to know your and other opinions :)<br><br>> Persistent allocation is the best solution. Talloc will minimally<br>> affect performance if at all. Internal caching is somewhat of a hack<br>> to hide static allocation behind an API that does not allow it.<br><br>I'll try to use persistent allocation where it's possible, e.g.<br>the struct vdecoder in osmo_conv_decode_acc() could be allocated<br>in the stack instead of heap.<br><br>> Three years ago, which feels like much longer, I was performing brute<br>> force RNTI searches on LTE control channels. Convolutional decoding<br>> was the limiting factor and maxed out multiple threads; every<br>> optimization helped. That was a much different set of requirements.<br><br>Ok, that is exactly what I need to know.<br>Now I can let internal caching go, as it isn't critical for GSM.<br><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>With best regards,<br></div><div>Vadim Yanitskiy.<br></div></div></div></div></div></div></div></div>