Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Address generation units basically do C array indexing and pointer arithmetic, e.g. a[i], p + i, where a is a pointer of a particular size.

https://en.wikipedia.org/wiki/Address_generation_unit

In C, something like a[i] is more or less:

    (char*)(a) + (i * sizeof(*a))
And I think it will do a lot more than that for "free", e.g. a[i+1] or a[2k+1], though I don't know the details.

By having address calculations handled by separate circuitry that operates in parallel with the rest of the CPU, the number of CPU cycles required for executing various machine instructions can be reduced, bringing performance improvements.[2][3]



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: