<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn" -->

---
title: Knowing Where to Type ‘Zero’ (2015) | daily.dev
description: Two war stories illustrate how tiny code changes—literally typing a zero—can fix major performance regressions caused by memory allocation flags. The first...
canonical: https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Knowing Where to Type ‘Zero’ (2015) | daily.dev
og:description: Two war stories illustrate how tiny code changes—literally typing a zero—can fix major performance regressions caused by memory allocation flags. The first...
og:url: https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn
og:image: https://api.daily.dev/og/posts/sFsJBnTgn.png
og:image:alt: Knowing Where to Type ‘Zero’ (2015)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowing Where to Type ‘Zero’ (2015)

**[Lobsters](https://daily.dev/sources/lobsters)** · 5 min read · 0 upvotes · 0 comments

## Summary

Two war stories illustrate how tiny code changes—literally typing a zero—can fix major performance regressions caused by memory allocation flags. The first recounts an Xbox game function that consumed 7% of CPU time due to accidentally allocated non-cacheable memory; correcting a single flag dropped it to 0.7%. The second describes a Windows disk cache being purged constantly because a device driver set SectorSize to 0xFFFFFFFF, which the kernel misinterpreted as a 4 GiB allocation. Both cases underscore that measurement-driven profiling, not guesswork, is what reveals these fixes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://randomascii.wordpress.com/2015/01/19/knowing-where-to-type-zero>

## Questions this post answers

### why would allocating non-cacheable memory on a game console cause a huge performance regression

Reading from non-cacheable memory bypasses the CPU cache, so every access goes almost directly to RAM, which is drastically slower. On the original Xbox's 733 MHz CPU, a matrix transformation function consuming 7% of total CPU time dropped to about 0.7% once its data was moved out of erroneously-flagged non-cacheable memory by changing one allocation flag to zero.

_daily.dev surfaces deep-dive performance postmortems like this for engineers chasing similar caching regressions._

### how did setting SectorSize to 0xFFFFFFFF cause a 4 GiB memory allocation on Windows

A device driver set SectorSize to 0xFFFFFFFF (-1) meaning to signal an unknown sector size, but the Windows kernel interpreted that value literally as 4 GiB and allocated a block of that size. This transient 4 GiB allocation repeatedly purged the disk cache on the affected laptop, causing a significant, hard-to-diagnose performance regression traced back to a backup drive's driver.

_track down obscure driver-level performance regressions faster by following investigations like this on daily.dev._

## Similar posts on daily.dev

- [Zeroization, part 1: Wiping can make things worse](https://daily.dev/posts/zeroization-part-1-wiping-can-make-things-worse-j17ny9xn4) · Lobsters · 1 upvotes · 0 comments
- [Windows 11 is flipping a hidden setting next month that costs gamers real performance — here's how much](https://daily.dev/posts/windows-11-is-flipping-a-hidden-setting-next-month-that-costs-gamers-real-performance-here-s-how-m-paawcbh72) · XDA Developers · 1 upvotes · 0 comments
- [Linux Fixes A Performance Regression In The Slab Code](https://daily.dev/posts/linux-fixes-a-performance-regression-in-the-slab-code-7yac61qlm) · Phoronix · 0 upvotes · 0 comments
- [How to Write High-Performance Code](https://daily.dev/posts/how-to-write-high-performance-code-1e303rwjv) · ByteByteGo · 14 upvotes · 0 comments
- [Memory is running out, and so are excuses for software bloat](https://daily.dev/posts/memory-is-running-out-and-so-are-excuses-for-software-bloat-kpqx7rtke) · The Register · 0 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#c++](https://daily.dev/tags/c++)

[View this post on daily.dev](https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Knowing Where to Type ‘Zero’ (2015)","url":"https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn"},"datePublished":"2026-09-06T08:39:45.427Z","dateModified":"2026-09-06T08:40:40.731Z","description":"Two war stories illustrate how tiny code changes—literally typing a zero—can fix major performance regressions caused by memory allocation flags. The first...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,c++","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Knowing Where to Type ‘Zero’ (2015)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/knowing-where-to-type-zero-2015--sfsjbntgn#faq","mainEntity":[{"@type":"Question","name":"why would allocating non-cacheable memory on a game console cause a huge performance regression","acceptedAnswer":{"@type":"Answer","text":"Reading from non-cacheable memory bypasses the CPU cache, so every access goes almost directly to RAM, which is drastically slower. On the original Xbox's 733 MHz CPU, a matrix transformation function consuming 7% of total CPU time dropped to about 0.7% once its data was moved out of erroneously-flagged non-cacheable memory by changing one allocation flag to zero. daily.dev surfaces deep-dive performance postmortems like this for engineers chasing similar caching regressions."}},{"@type":"Question","name":"how did setting SectorSize to 0xFFFFFFFF cause a 4 GiB memory allocation on Windows","acceptedAnswer":{"@type":"Answer","text":"A device driver set SectorSize to 0xFFFFFFFF (-1) meaning to signal an unknown sector size, but the Windows kernel interpreted that value literally as 4 GiB and allocated a block of that size. This transient 4 GiB allocation repeatedly purged the disk cache on the affected laptop, causing a significant, hard-to-diagnose performance regression traced back to a backup drive's driver. track down obscure driver-level performance regressions faster by following investigations like this on daily.dev."}}]}
```

