The benchmark test cases include overhead for object creation. That might skew the test results a bit.
Getters and setters aren't benchmarked individually. Instead, the benchmark tests call getters and setters an equal number of times. But in the Z Buffer Demo getters seem to predominate (based on a quick read the code). Intuitively, getters are going to be faster than setters, perhaps enough so to explain a factor of 6 improvement.
In reply to Re: Re: Micro optimisations can pay off, and needn't be a maintenance problem
by dws
in thread Micro optimisations can pay off, and needn't be a maintenance problem
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |