I am looking to write an application which should be able to scale well under load, particularly with regard to network traffic (sort of like a pretty looking version of the old BBS systems, with some live chat facility, and eventually the ability to use live video -- but I'm not thinking about the live video part yet, that's just something on the specifications to implement when we've got the other stuff running properly).
Because of this I need everything to be absolutely as efficient as possible, so it can scale to accommodate the largest possible number of users, with the smallest possible investment (I could probably count the amount of 'spare' money here on the fingers of a dismembered limb).
SO... I'll be asking quite a few efficiency related questions here. The first one being:
n = 1375;
n = 0x55F;
No. Numbers end up getting stored as a floating point decimal value, no matter how they are initially defined. And, defining a hex value or the equivalent decimal value in the code will create exactly the same result in the JS interpreter.
Does it perform any implicit conversation between these two types, for example?
var a = parseInt("255", 10); var b = parseInt("FF", 16); var c = 255; var d = 0xFF; log(a === b); log(a === d); log(b === c); log(c === d);