I often see arguments between Classical (faked via some library), Pseudo-Classical and Prototypal Inheritance mention "efficiency." However, I've never seen any data backing any of this kind of stuff up. Not to mention "efficiency" seems like an ambiguous word when it comes to a coding style, rather than an algorithm.
I'd like to do some tests to "benchmark" some of these patterns and libraries. This seems distinctly different than most algorithm or display benchmarks that I've seen in the past. What do you guys think are the important things to test, and what are the best ways to get those numbers reliably.
What I'm thinking currently:
- Speed of instantiation (Time the creation of a few thousand objects using each pattern w/ identical functionality)
- Memory usage (The only way I can think is to look at my memory in the task manager... is there a better way)
- Speed of access to internal properties and methods (iteration timing again)
- Speed of copies (iteration timing)
- Lines of code (Peer reviewed best practice following examples with a count)
Any fallacies, additions, or objections? Anyone seen this data elsewhere?
Thanks!