<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gabriel de Jesus</title>
    <description>The latest articles on DEV Community by Gabriel de Jesus (@senseei).</description>
    <link>https://dev.to/senseei</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1435078%2F545dc8e7-9a3d-4ac3-b8e0-2e0bf58555bc.jpeg</url>
      <title>DEV Community: Gabriel de Jesus</title>
      <link>https://dev.to/senseei</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/senseei"/>
    <language>en</language>
    <item>
      <title>Sorting Algorithms Performance Analysis</title>
      <dc:creator>Gabriel de Jesus</dc:creator>
      <pubDate>Fri, 19 Apr 2024 16:51:54 +0000</pubDate>
      <link>https://dev.to/senseei/sorting-algorithms-performance-analysis-5c54</link>
      <guid>https://dev.to/senseei/sorting-algorithms-performance-analysis-5c54</guid>
      <description>&lt;p&gt;For those who study algorithms and programming logic, we know there are some powerful algorithms in matter of &lt;strong&gt;efficiency&lt;/strong&gt;. But have you ever seen numbers showing the real difference between them?&lt;br&gt;
I asked that to myself and I decided to implement by myself some famous algorithms and timed them when sorting two particulars arrays of &lt;strong&gt;n&lt;/strong&gt; size. We can see it bellow:&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Testing sorting algorithms
&lt;/h4&gt;
&lt;h6&gt;
  
  
  Array length: 100000
&lt;/h6&gt;

&lt;p&gt;Testing &lt;strong&gt;Merge Sort&lt;/strong&gt;...&lt;br&gt;
  Best case average time: 0.045 seconds&lt;br&gt;
  Worst case average time: 0.041 seconds&lt;br&gt;
Testing &lt;strong&gt;Heap Sort&lt;/strong&gt;...&lt;br&gt;
  Best case average time: 0.022 seconds&lt;br&gt;
  Worst case average time: 0.016 seconds&lt;br&gt;
Testing &lt;strong&gt;Quick Sort&lt;/strong&gt;...&lt;br&gt;
  Best case average time: 0.021 seconds&lt;br&gt;
  Worst case average time: 0.021 seconds&lt;br&gt;
Testing &lt;strong&gt;Selection Sort&lt;/strong&gt;...&lt;br&gt;
  Best case average time: 16.457 seconds&lt;br&gt;
  Worst case average time: 18.538 seconds&lt;br&gt;
Testing &lt;strong&gt;Bubble Sort&lt;/strong&gt;...&lt;br&gt;
  Best case average time: 0.001 seconds&lt;br&gt;
  Worst case average time: 40.580 seconds&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;the average gets more precise when you increase the times you execute the algorithms, in this case, each algorithm has been executed 10 times. I choose that amount because the Selection and Bubble would take a lot to finish if I insert higher values..&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>programming</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
