fastdebug vs optimized?

Thomas Stüfe thomas.stuefe at gmail.com
Wed Jan 31 13:52:02 UTC 2018


Hi all,

Sorry for asking the same question again, but I still struggle to
understand the difference between fastdebug and optimized builds. Not the
technical details, that is clear (I hope):

optimized: optimized build with !ASSERT !PRODUCT
fastdebug: optimized build with ASSERT !PRODUCT

but what the point is for having two builds with such similarities. What is
the optimized build used for?

When should I guard verification code with ASSERT, when with !PRODUCT? As
for the latter, it feels weird to use guarantee and then having to guard it
explicitly with !PRODUCT, but that is what I would have to do to get
assertions in optimized build while still suppressing them in release
builds, yes?

I always assumed that the optimized build is supposed to be faster than
fastdebug, so, expensive verifications should be better left to ASSERT? But
then, I see quite some coding contradicting this expectation. The coding
itself is no real guideline either, I see both ASSERT and !PRODUCT used
without recognizing a clear pattern.

So, still confused. Can someone enlighten me please :)

Thanks & Regards, Thomas


More information about the hotspot-dev mailing list