This is a story about a painfully slow query. 14 hours to return a response. Sometimes this is acceptable, I actually don’t know when 14 hours is acceptable but oh well… In order to make it go fast I immediately thought of indexing the database, BUT, the object has dynamic keys at every level and it has virtually infinite depth, these two attributes make it unsuitable for conventional indexing. My thought is, at least flatten and hash the object, first flattening it would convert the object into a single string that will probably be stored in sequential order in memory, as opposed to an object. An object needs to be traversed and do memory lookups at every level to find the appropriate key. Furthermore.
Comparing two strings is plainly more efficient than the whole process of comparing key by key in two objects. You have the two strings stored in registers, prob, then move them both to ALU 64bit by 64bit and start subtracting them until the whole stream equals 0, a positive match is returned. Faster than traversing the object.
Become a member
There was an odd issue with some URLs and netty where URLs that contained a capital M or capital J would make the URL invalid. Idk why the J fails but M is because the decoding of M become \r which is a reserved character.
Please accept this $100 gift card — testing this out:
Card Number: 4463170015342648
Exp: 01/35
CVV: 517
Top comments (0)