<p><a href="https://gerrit.osmocom.org/13137">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c">File src/libmsc/call_leg.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@78">Patch Set #9, Line 78:</a> <code style="font-family:monospace,monospace">talloc_zero</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> The talloc API does not provide a macro similar to talloc_zero() that names the struct [...] […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">hmm, I didn't see that! even the first on top. All I saw was talloc_size(). I apologize for being blind.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c">File src/libmsc/e_link.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@77">Patch Set #9, Line 77:</a> <code style="font-family:monospace,monospace">*e = (struct e_link) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">the point is that the compiler is unable to optimize away initializing the same bit of memory *twice […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Every time micro optimisation comes up I think we should actually start some profiling effort that tells us how much time is spent where. Then we could sensibly argue about performance changes with hard data to support it. I think there are quite a few things we do far more often that are a lot worse than this, O(N) things instead of O(1). Comes to mind: iterating entire linked-lists over all items to find the conn for a received message / the vsub for a subscriber / ...; iterating value_string[] instead of using array index; copying msgb around to get enough headroom.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Compared to those, I suspect that this is really not worth even commenting about. Writing about this double-zero-init likely took more time than osmo-msc would spend doing this in ten years of operation.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13137">change 13137</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13137"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd </div>
<div style="display:none"> Gerrit-Change-Number: 13137 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 08 May 2019 14:43:25 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>