Caching some values to avoid frequent unaligned reads

also bumping up compilation warning level in the cmake file