{"type":"rich","version":"1.0","provider_name":"Transistor","provider_url":"https://transistor.fm","author_name":"Programming Tech Brief By HackerNoon","title":"Composite Keys: A Guide on How to Handle Them","html":"<iframe width=\"100%\" height=\"180\" frameborder=\"no\" scrolling=\"no\" seamless src=\"https://share.transistor.fm/e/3ad4217c\"></iframe>","width":"100%","height":180,"duration":548,"description":"\n        This story was originally published on HackerNoon at: https://hackernoon.com/composite-keys-a-guide-on-how-to-handle-them.\nHow to best handle composite map keys in your code, and what offers the best performance\nCheck more stories related to programming at: https://hackernoon.com/c/programming.\n            You can also check exclusive content about #java, #performance, #memory-allocation, #cache, #composite-keys, #how-to-create-a-comp-key, #use-nested-maps, #hackernoon-top-story, #hackernoon-es, #hackernoon-hi, #hackernoon-zh, #hackernoon-fr, #hackernoon-bn, #hackernoon-ru, #hackernoon-vi, #hackernoon-pt, #hackernoon-ja, #hackernoon-de, #hackernoon-ko, #hackernoon-tr,  and more.\nThis story was written by: @kevinmasur. Learn more about this writer by checking @kevinmasur's about page,\n            and for more stories, please visit hackernoon.com.\nMost of the time, just keep it simple. Combine your composite keys into a string key for storage in a map or cache if that is the easiest option and performance is not a major concern.\n\nIn scenarios where performance is critical, make sure to do your own testing. But using nested maps will be the most performant in most cases. It will also likely have the smallest storage requirements. And composite keys are still a performant alternative when nesting mappings become impractical.","thumbnail_url":"https://img.transistorcdn.com/KhCapPSRkLGL2Xw8888yuChkNRWthaKapLYTvNdu4W4/rs:fill:0:0:1/w:400/h:400/q:60/mb:500000/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS9zaG93/LzQxMTY2LzE2ODM1/ODIzMzAtYXJ0d29y/ay5qcGc.webp","thumbnail_width":300,"thumbnail_height":300}