Re:Google SoundScript: faster OOP for JavaScript
by greggman on Thursday February 05, 2015 @04:12AM
(#9002334)
Watch the talk.
You've got a gig of ram in your pocket. Memory doesn't matter for 99.99999% of apps. The memory taken by your objects isn't where your memory goes. It goes to images and other big stuff. A few extra bytes per object isn't going to kill you. Optimize for programmer time not memory, especially not in memory on things that don't matter.
Why are you using "instanceof". The whole point of inheritance is you shouldn't have to ask. If you are asking your doing it wrong
You've got a gig of ram in your pocket. Memory doesn't matter for 99.99999% of apps. The memory taken by your objects isn't where your memory goes. It goes to images and other big stuff. A few extra bytes per object isn't going to kill you. Optimize for programmer time not memory, especially not in memory on things that don't matter.
Why are you using "instanceof". The whole point of inheritance is you shouldn't have to ask. If you are asking your doing it wrong