#
"*": "https://raw.githubusercontent.com/wefindx/schema/master/project/oo-item.yaml"
#
"base:title": "0oo - Nested loops with index locality"
"og:title": "Nested loops with index locality"
"og:description": "If you iterate over data, the most efficient retrieval is where the data is all in a line. How do we arrange data so that data is always near the previous data we retrieved?"
"og:image": "https://avatars0.githubusercontent.com/u/28134655"
"og:url": "/intent/46001/"
"base:css": "/static/css/bootstrap.min.9c25540d6272.css"
"base:extra-css": "/static/css/base.57997aeac1df.css"
"base:favicon": "/static/favicon.acaa334f0136.ico"
"base:body_class": ""
"layout:logo": "/static/0oo.8d2a8bbef612.svg"
"layout:index": "/"
"layout:menu": "/menu/"
"layout:categories": "/intents/"
"layout:ideas": "/methods/"
"layout:projects": "/projects/"
"layout:users": "/users/"
"layout:about": "/about/"
"layout:help": "/help/"
"layout:bug_report": "https://github.com/wefindx/0oo"
"layout:login": "/accounts/login/"
"layout:light-off": "/darken/?darken=true"
"layout:set-multilingual": "/mulang/?mulang=true"
"layout:lang": "言語"
"layout:set-language-post-action": "/i18n/setlang/"
"layout:csrf-token": "IAbx23IqCzOwNNAt51GnH7qnDBIfZg3pavXFd58rVF3iTNv7BTE4BXqSTk5f5osp"
"layout:input-next": "/project/46001/"
"layout:languages": [{"code": "ja", "is-active": "true", "name": "日本語"}, {"code": "lt", "is-active": "false", "name": "Lietuviškai"}, {"code": "zh-hans", "is-active": "false", "name": "简体中文"}, {"code": "en", "is-active": "false", "name": "English"}, {"code": "ru", "is-active": "false", "name": "Русский"}, {"code": "oo", "is-active": "false", "name": "O;o,"}]
#
"item:title": "Nested loops with index locality"
"item:score": -3.0
"item:mission": "Can we loop and avoid cache misses for computer performance?"
"item:permalink": "/project/46001/?l=ja"
"item:base-administration": false
"item:body": |
If you iterate over data, the most efficient retrieval is where the data is all in a line.
How do we arrange data so that data is always near the previous data we retrieved?
"item:destinations": |
"item:source-date": ""
"item:permalink": "/method/46001/?l=ja"
"item:owner": "chronological"
"item:created": "2022-07-25T14:57:30.762464"
"item:ownerlink": "/user/198/chronological"
#
"item:result:items":
- "id": "t-137001"
"url": "https://replit.com/@Chronological/EfficientLoop"
"text": |
I wrote a nested for loop that iterates in reverse order between iterations to minimize cache misses.
"cost": -3.0
"currency": "HUR"
"assets": |
I spent a few hours on this.
If this was applied to all looping of programs, we could have even more efficient programs.
"owner": "chronological"
"ownerlink": "/user/198/chronological"
"permalink": "/project/46001/?l=ja#t-137001"
"created": "2022-07-25T14:58:54.693916"
"happened": "2022-07-25T14:57:36"
"models":
"item:result:add": "/admin/hlog/task/add/?parent=46001"
"item:transfer:items":
"item:transfer:add": "/admin/hlog/operation/add/?parent=46001"
"item:comment:add": "/projects/addnote?parent=46001"
"item:comment:add:csrf_token": "IAbx23IqCzOwNNAt51GnH7qnDBIfZg3pavXFd58rVF3iTNv7BTE4BXqSTk5f5osp"
"item:comment:form": |