Efficient map implementation