4 ms·
Tangentially related: https://docs.microsoft.com/en-us/answers/questions/680467/exchange-scan-engine-failed-to-load-can39t-convert.html https://docs.microsoft.
by Slartie 5y ago
Tangentially related:
https://docs.microsoft.com/en-us/answers/questions/680467/exchange-scan-engine-failed-to-load-can39t-convert.html https://docs.microsoft.com/en-us/answers/questions/680467/ex...
Had Microsoft used an unsigned int to store the date - which can't ever be negative in this
notation - Exchange wouldn't have stopped working worldwide on 1/1/2022. They would have been safe for another two decades, in which they would hopefully had either gotten rid of that weird code or switched it over to 64 bits.
- sparkie 5y agoHad Microsoft used common sense, they would not store the string representation of a date as an integer, period.
- jeroenhd 5y agoIt depends on the use case. If this is an index that's commonly sorted by and enumerated, the performance impact of a string compare versus a simple 64 bit integer compare would be enormous. A single compare instruction versus a series of unicode character comparison operations with subsequent jump instructions would not only be more code, it would also be more likely to wreck the branch predictor of the CPU with all the added conditionals. I think using 64 bit integers for their natural hardware-accelerated sortability is quite a neat trick. You just have to be sure to use actual 64 bit numbers, and you have to think ahead to check if your data type is wide enough to actually contain your data.
- masklinn 5y ago> They would have been safe for another two decades, in which they would hopefully had either gotten rid of that weird code or switched it over to 64 bits. Why? The code would have kept working all along, there would have been no reason to explore it, and lots of other issues to chase.
- bee_rider 5y agoThis ought to be the canonical example for this sort of thing -- in the sense the unsigned value only* 'helps' if you are already doing something terminally silly. *to some definition of 'only' that excludes the cases like cryptography, hardware, etc stuff.