Does a directory inode use a plain array storing ( filename, inode )
pairs, or some kind of associative array { filename: inode }
to speed up file lookup, or any other optimizations on a plain array?
Take ext2/3/4 as example if you think the question is too broad or filesystem-specific.
This question is specifically focused on the internal representation of directory inodes.