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

They wrote their own json parser which used strlen() all over the place, which is O(n), resulting in O(n^2) complexity for json parsing. The guy shimmed the function to return a cached response if it was called with the same string consecutively, which it was for parsing the JSON. The JSON contained the items in the real-money store btw.


Why would anyone ever write their own JSON parser? There're countless libs available that are hyper-optimized.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: