6 – Doubles Are Bigger

So I think I have some understanding of this, but if for example, doubles are more precise than floats, why not just always use doubles? Because they’re bigger. It doesn’t really matter if you’re doing a small program, but if you needed to do a program where you had a million variables, doubles are twice the size of floats. And our computers have so much memory now. It’s amazing what comes in our laptops. But when you go to an embedded system, sometimes you don’t have the memory, and you need to be aware of your limitations, of your resource constraints. So you choose to use floats or you even choose to do fixed point. But a self-driving car I can put a lot of computer into the trunk. Every computer you put into the trunk is a power waste, which means it’s another mile you can’t drive.

%d 블로거가 이것을 좋아합니다: