Title: Cache Associativity - Incomplete explanation is maybe misleading · Issue #340 · algorithmica-org/algorithmica · GitHub
Open Graph Title: Cache Associativity - Incomplete explanation is maybe misleading · Issue #340 · algorithmica-org/algorithmica
X Title: Cache Associativity - Incomplete explanation is maybe misleading · Issue #340 · algorithmica-org/algorithmica
Description: https://en.algorithmica.org/hpc/cpu-cache/associativity/ The section does not specify that this slowdown only occurs when iterating the array multiple times, leading to confusion, and perhaps believing that a single iteration of an array...
Open Graph Description: https://en.algorithmica.org/hpc/cpu-cache/associativity/ The section does not specify that this slowdown only occurs when iterating the array multiple times, leading to confusion, and perhaps belie...
X Description: https://en.algorithmica.org/hpc/cpu-cache/associativity/ The section does not specify that this slowdown only occurs when iterating the array multiple times, leading to confusion, and perhaps belie...
Opengraph URL: https://github.com/algorithmica-org/algorithmica/issues/340
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cache Associativity - Incomplete explanation is maybe misleading","articleBody":"https://en.algorithmica.org/hpc/cpu-cache/associativity/\n\nThe section does not specify that this slowdown only occurs when iterating the array multiple times, leading to confusion, and perhaps believing that a single iteration of an array also suffers of some unspecific cache thrashing slowdown? In my cpu it seems to only exhibit a difference between the two loops when I do a few full iterations of each, not if I allocate a fresh array for each loop.\n\nI suggest changing the loops to the following, in order to prevent confusion.\n```c\nfor (int j = 0; j \u003c K; j++) \n for (int i = 0; i \u003c N; i += {256,257})\n a[i]++;\n```\n\nThank you for the truly great resource that is this book!\n","author":{"url":"https://github.com/ttmx","@type":"Person","name":"ttmx"},"datePublished":"2025-05-06T03:51:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/340/algorithmica/issues/340"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f6096c0a-941c-e8a3-07a2-f4b5474559b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA54:1F6BC8:352C000:4595FFA:697D7F15 |
| html-safe-nonce | 0a701e8209f127b484ef83c4a9c5293d52dd3bec316fdbc661b7952b27b81779 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTU0OjFGNkJDODozNTJDMDAwOjQ1OTVGRkE6Njk3RDdGMTUiLCJ2aXNpdG9yX2lkIjoiNTc1MjE4MDQyMzQ4MDE0NzczMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cf2d1564d719feec54e522cdd75fbaf571776e092780af52ba7ebc1c22d1badf |
| hovercard-subject-tag | issue:3041437971 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/algorithmica-org/algorithmica/340/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52f116a3659b5186e36bce307c1e2aac38d7d035efe0e9a7ca0dc17d1a41a721/algorithmica-org/algorithmica/issues/340 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52f116a3659b5186e36bce307c1e2aac38d7d035efe0e9a7ca0dc17d1a41a721/algorithmica-org/algorithmica/issues/340 |
| og:image:alt | https://en.algorithmica.org/hpc/cpu-cache/associativity/ The section does not specify that this slowdown only occurs when iterating the array multiple times, leading to confusion, and perhaps belie... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ttmx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/algorithmica-org/algorithmica git https://github.com/algorithmica-org/algorithmica.git |
| octolytics-dimension-user_id | 51334463 |
| octolytics-dimension-user_login | algorithmica-org |
| octolytics-dimension-repository_id | 333536823 |
| octolytics-dimension-repository_nwo | algorithmica-org/algorithmica |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 333536823 |
| octolytics-dimension-repository_network_root_nwo | algorithmica-org/algorithmica |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width