<?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: Jeet Patel</title>
    <description>The latest articles on DEV Community by Jeet Patel (@jeet_0474).</description>
    <link>https://dev.to/jeet_0474</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4125299%2F395da2e9-b1c9-495a-a77c-0e1a9f145fc5.jpeg</url>
      <title>DEV Community: Jeet Patel</title>
      <link>https://dev.to/jeet_0474</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeet_0474"/>
    <language>en</language>
    <item>
      <title>I Dual-Boot Windows 11 and Ubuntu on the Same Laptop. Here's What Each One Actually Feels Like.</title>
      <dc:creator>Jeet Patel</dc:creator>
      <pubDate>Mon, 28 Sep 2026 15:30:00 +0000</pubDate>
      <link>https://dev.to/jeet_0474/i-dual-boot-windows-11-and-ubuntu-on-the-same-laptop-heres-what-each-one-actually-feels-like-137p</link>
      <guid>https://dev.to/jeet_0474/i-dual-boot-windows-11-and-ubuntu-on-the-same-laptop-heres-what-each-one-actually-feels-like-137p</guid>
      <description>&lt;p&gt;I dual-boot Windows 11 and Ubuntu on the same laptop. Ryzen 5 3500U, 8 GB RAM, one SSD.&lt;/p&gt;

&lt;p&gt;I am not a hardware reviewer. I am a guy who got tired of one OS feeling like a different, slightly angrier laptop.&lt;/p&gt;

&lt;p&gt;Here's the honest breakdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  Booting up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Windows 11&lt;/strong&gt;: I log in, and then I wait.&lt;/p&gt;

&lt;p&gt;The login itself is fine. The problem is what happens afterward.&lt;/p&gt;

&lt;p&gt;For the first four or five minutes, the laptop feels like it's still trying to wake up. Apps take noticeably longer to open, the system feels busy even when I'm not doing anything, and using it doesn't feel smooth yet.&lt;/p&gt;

&lt;p&gt;At this point, I've started making coffee after turning it on.&lt;/p&gt;

&lt;p&gt;Not because I want coffee.&lt;/p&gt;

&lt;p&gt;Because the laptop needs the time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ubuntu&lt;/strong&gt;: type my password, start working.&lt;/p&gt;

&lt;p&gt;That's it.&lt;/p&gt;

&lt;p&gt;No five-minute warm-up period. No waiting for the system to settle down. If I want to open my editor immediately after logging in, I just open it and start working.&lt;/p&gt;

&lt;h2&gt;
  
  
  The RAM situation
&lt;/h2&gt;

&lt;p&gt;I do Flutter dev. Flutter wants RAM the way toddlers want your phone: immediately, all of it, no negotiation.&lt;/p&gt;

&lt;p&gt;On Windows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in.&lt;/li&gt;
&lt;li&gt;Open the editor.&lt;/li&gt;
&lt;li&gt;Half my RAM is already gone.&lt;/li&gt;
&lt;li&gt;To things I didn't open.&lt;/li&gt;
&lt;li&gt;Mouse starts stuttering like a bad video call.&lt;/li&gt;
&lt;li&gt;Flutter build: does not happen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On Ubuntu, RAM climbs to 90-99% during real work and the desktop stays smooth the whole time. I don't fully understand how they do it but it's great to work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick-fire differences
&lt;/h2&gt;

&lt;p&gt;Things I've noticed just from living in both, no lab coat required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Customizing the desktop:&lt;/strong&gt; costs ~150-200 MB extra on Ubuntu. Same kind of customization on Windows: 600-700 MB. Same haircut, very different bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Battery life:&lt;/strong&gt; noticeably better on Linux, maybe 30-40% less drain in a normal day. Measured with vibes, not a stopwatch, but a big enough gap that I noticed without trying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fan noise and heat:&lt;/strong&gt; lower on Ubuntu. I can feel it on my lap. Windows, some days, feels like it's plotting something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uninstalled bloatware:&lt;/strong&gt; stays uninstalled on Ubuntu. On Windows, it comes back after updates like a horror movie villain. I didn't invite you back, Doll.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where Windows still wins
&lt;/h2&gt;

&lt;p&gt;Gaming. Just gaming.&lt;/p&gt;

&lt;p&gt;Plug in, click play, done. Linux gaming has gotten genuinely good, but it's not yet "tell your non-technical friend to switch" good.&lt;/p&gt;

&lt;p&gt;Credit where it's due.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I even checked
&lt;/h2&gt;

&lt;p&gt;At some point I got curious enough to actually open Task Manager and Ubuntu's Resources app, side by side, both idle, both freshly logged in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq9pii7h7btahkajvj7gj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq9pii7h7btahkajvj7gj.png" alt="Windows Task Manager showing memory usage" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Windows: 70%+ RAM used, with the CPU bouncing around in the background despite me not actually doing anything.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy044diwya3r9kc98fust.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy044diwya3r9kc98fust.png" alt="Ubuntu Resources showing memory usage" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ubuntu: about a quarter of its RAM or less used, CPU barely awake.&lt;/p&gt;

&lt;p&gt;These are screenshots from one laptop on one day. Not a benchmark. Just receipts for a feeling I'd already had for months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I land
&lt;/h2&gt;

&lt;p&gt;Give it enough background processes and Windows will always feel like it's carrying something. Give Linux proper gaming support and a few more years of people just trying it, and I don't think Windows keeps its lead on hardware like mine.&lt;/p&gt;

&lt;p&gt;Right now the only things holding people back are habit and Steam.&lt;/p&gt;

&lt;p&gt;Anyone else dual-boot and feel this gap? Or is my Windows install just cursed?&lt;/p&gt;

</description>
      <category>windows</category>
      <category>productivity</category>
      <category>opensource</category>
      <category>linux</category>
    </item>
    <item>
      <title>From 3ms to 0ms: The Hidden Memory Trap in C++ Maps</title>
      <dc:creator>Jeet Patel</dc:creator>
      <pubDate>Tue, 15 Sep 2026 02:12:16 +0000</pubDate>
      <link>https://dev.to/jeet_0474/from-3ms-to-0ms-the-hidden-memory-trap-in-c-maps-4m3h</link>
      <guid>https://dev.to/jeet_0474/from-3ms-to-0ms-the-hidden-memory-trap-in-c-maps-4m3h</guid>
      <description>&lt;h1&gt;
  
  
  From 3ms to 0ms: The Hidden Memory Trap in C++ Maps
&lt;/h1&gt;

&lt;p&gt;I thought I was writing the cleanest one-liner of my life.&lt;/p&gt;

&lt;p&gt;To solve Two Sum, I stored 1-based indices in an &lt;code&gt;unordered_map&lt;/code&gt; so I could check for complements directly inside an &lt;code&gt;if&lt;/code&gt; statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It passed. But it took &lt;strong&gt;3ms&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On a whim, I swapped that single line to &lt;code&gt;mp.find()&lt;/code&gt;. The runtime plummeted straight to &lt;strong&gt;0ms&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Why would two operations that look like basic O(1) lookups perform so radically differently?&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Secret Life of `operator[]&lt;/strong&gt;`&lt;/p&gt;

&lt;p&gt;In C++, square brackets aren't just looking through the window. If the key isn't there, C++ assumes you're lonely and creates a new friend for you on the spot.&lt;/p&gt;

&lt;p&gt;When you call &lt;code&gt;mp[missing_key]&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It allocates a brand-new node on the heap.&lt;/li&gt;
&lt;li&gt;It inserts &lt;code&gt;missing_key&lt;/code&gt; with a default value of &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It hands back a reference to that &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because &lt;code&gt;0&lt;/code&gt; evaluates to &lt;code&gt;false&lt;/code&gt;, my &lt;code&gt;if&lt;/code&gt; condition technically worked. But behind the scenes, every single failed lookup left a ghost entry behind. My map was hoarding junk data, thrashing CPU caches, and triggering expensive hash table rehashes mid-loop.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mp.find()&lt;/code&gt;, on the other hand, is strictly read-only. If the key isn't there, it returns &lt;code&gt;mp.end()&lt;/code&gt; and walks away without touching heap memory.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Fix&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The 3ms Trap: Allocates heap memory for ghost entries on every miss&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;complement&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// The 0ms Clean Run: Read-only check, zero allocations&lt;/span&gt;
&lt;span class="k"&gt;auto&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;complement&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Tip: In C++20, if you only care about presence and don't need the value right away, &lt;code&gt;mp.contains(key)&lt;/code&gt; gives you the same zero-allocation check with even cleaner syntax).&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Rule of Thumb&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Never use &lt;code&gt;[]&lt;/code&gt; to ask, &lt;em&gt;"Are you there?"&lt;/em&gt;&lt;br&gt;
Square brackets are for modifying data, not window shopping.&lt;/p&gt;




&lt;p&gt;Have you ever had an optimization that looked slick on paper but quietly blew up your runtime? Drop your favorite sneaky C++ traps or debugging facepalms in the comments!&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
      <category>performance</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
