Game Development Reference
In-Depth Information
Using the white box approach involves studying the implementation details
behind a particular component or function, and deriving a list of characteristics to
factor into performance testing based on the complexity and perceived cost of
completing a particular task. White box testing is great when trying to understand
the technology in greater detail, and it allows you to easily identify and address
performance pitfalls related to implementation. White box testing makes it very
difficult to produce quantitative performance metrics. Relative performance can
be measured using an order of magnitude, but only on a piece of functionality in
isolation from other components in the system or various software and hardware
configurations. Code that may appear slow or overly complex may run quite fast
on different hardware with a caching strategy or with an optimizing compiler.
Code that may appear efficient has the potential to run extremely slowly or ineffi-
ciently on different hardware or software configurations.
Using the block box approach involves disregarding the implementation details
and instead basing test results on overall execution time. Black box testing is great
in the sense that you can end up with a set of strong and unambiguous metrics to
measure performance, including a fairly precise resolve understanding of the
capacity of a particular test case. The downside to black box testing results from
the nearly infinite number of software and hardware combinations, also known as
a combinatorial explosion. The sheer volume of combinations makes it nearly
impossible to determine a set of distinct systems that tests can be performed against.
Choosing the best approach depends on the type of investigation being conduct-
ed, and how large the system is. White box testing will not suffice for large systems
where there is a massive amount of code, or for systems that rely on third-party
components that do not have source code available. Black box testing is really to
determine which operations or tasks are problematic, making it difficult to deter-
mine exactly where the problem originates, unless the slowdown results from
architecture and the communication between distributed and isolated compo-
nents. Quite often, it makes sense to perform a little bit of white box testing in
complex areas and then perform a thorough investigation of performance using
the black box approach.
Avoid Manual Optimization
Many developers, especially the ones who have been in the industry for a while, are
used to optimizing code so tightly that they are concerned with how the compiler
is going to execute each segment of critical code, and so they use alternate syntax
in an attempt to compile more efficient code. There is no point in trying to perform
Search Nedrilad ::




Custom Search