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

It's even better with intrusive containers. As an extreme case, let's say we need a collection of 24 bit RGB triplets:

    struct node {
        uint8_t r, g, b;
        uint8_t idx_next;
    };
Of course, a contiguous array uint8_t[256][3] might still be faster.


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

Search: