I don't understand this.. What's this trying to tell ?
If I need to calculate the approximate memory required for 42652 records of 46 bytes, I'd just multiply them? So that'd be 1961992 bytes, if I wanted to know how many kibibytes it was, I'd divide by 1024 and that'd be 1916, or roughly 1,9 mib ?
If I needed giant numbers and knew my result be in the gigabyte range, I'd just divide by 1024^3
No, this is just for interviews and rough calculations.
I wouldn't dare to take 42652 records of 46 bytes for calculation.
I will need approx value anyway. so go for 40000 records for 50 bytes each instead or best use 50K of 50 bytes.
I'd be entirely put off by someone who prefers to spend 5 seconds to give some (probably wrong) estimate rather than spending 10 seconds to punch in an expression providing the correct answer on the giant calculating machine they're either way sitting in front of.
If I was asked during an interview, I'd either type it into the machine or write the calculation on the whiteboard and tell that there's absolutely no reason for me to concern myself with performing calculations when my job is literally to instruct machines to perform them.
5 comments
[ 3.3 ms ] story [ 21.5 ms ] threadIf I need to calculate the approximate memory required for 42652 records of 46 bytes, I'd just multiply them? So that'd be 1961992 bytes, if I wanted to know how many kibibytes it was, I'd divide by 1024 and that'd be 1916, or roughly 1,9 mib ?
If I needed giant numbers and knew my result be in the gigabyte range, I'd just divide by 1024^3
If I was asked during an interview, I'd either type it into the machine or write the calculation on the whiteboard and tell that there's absolutely no reason for me to concern myself with performing calculations when my job is literally to instruct machines to perform them.
Teaching grandmother to suck eggs