Revert "Revert "Revert "Tweaking of compiler optimizations"""

This reverts commit 3ceee3f10d32ff129afb772d19d8b7d797558c2c.