# Lucas Beyer asks if pointers can become array indexes

> Original title: > can we make the pointers an index into the array

- Source: Lucas Beyer
- Published: 2026-11-02T18:02:45.000Z
- Bad Influence: https://badinfluence.news/items/au448bu0idq254ueiosef5qah
- Original: https://x.com/giffmana/status/2117316496775061926

## Summary

Lucas Beyer asks whether pointers can be replaced by indexes into an array. The post quotes Jarred Sumner's prompts to Claude for performance work, including flat arrays, packed index bits, and structure-of-arrays layouts.

## Post

> can we make the pointers an index into the array

Is it just me or...?

## Quoted post @jarredsumner

> some things I often say to claude when doing perf optimization work:
> 
> > how do we rewrite this to better leverage data-oriented design principles
> 
> > can you replace those hash tables with a flat array? can we make the pointers an index into the array? can we pack the most commonly used data into upper bits of the index?
> 
> > caching is cope for a slow design. do not add caches and delete all existing caches. instead, redesign it to be faster
> 
> > should this be a structure of arrays instead of an array of structures?

https://x.com/jarredsumner/status/2117037940031496252
