Imagine that you are trying to store 32 boolean values, and must access them frequently. Compare the
Fantastic news! We've Found the answer you've been seeking!
Question:
Imagine that you are trying to store 32 boolean values, and must access them frequently. Compare the time required to access Boolean values stored alternatively as a single bit field, a character, a short integer, or a long integer. There are two things to be careful of when writing your program. First, be sure that your program does enough variable accesses to make meaningful measurements. A single access is much smaller than the measurement rate for all four methods. Second, be sure that your program spends as much time as possible doing variable accesses rather than other things such as calling timing functions or incrementing for loop counters.
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date: