<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/CendioOssman">Pierre Ossman (Work account)</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1223#note_312516311">discussion</a>:
</p>
<div style="">
<p dir="auto">Alright, so some testing by changing the test to loop 10000 times and running it through <code>perf</code>:</p>
<p dir="auto">a) Old code:</p>
<ul dir="auto">
<li>3.9 seconds runtime</li>
<li>0.06% spent in <code>_gnutls_x509_compare_raw_dn()</code>
</li>
</ul>
<p dir="auto">b) Current suggestion:</p>
<ul dir="auto">
<li>5.1 seconds runtime (30% worse)</li>
<li>22% spent in <code>_gnutls_x509_compare_raw_dn()</code>
</li>
</ul>
<p dir="auto">c) Doing binary comparison before string comparison:</p>
<ul dir="auto">
<li>4.2 seconds runtime (8% worse)</li>
<li>7.4% spent in <code>_gnutls_x509_compare_raw_dn()</code>
</li>
</ul>
<p dir="auto">So is c) good enough?</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1223#note_312516311">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/d7309ff22db31c0dfc6a25993555a92a/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1223#note_312516311"}}</script>


</p>
</div>
</body>
</html>