Performance and style improvements

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@21819 3a8e244f-b0f2-452b-bcba-4c88e055c3ca