hiraditya added a comment. Adding const could help compiler, I do not have any specific performance numbers yet. So if this is too much trouble then we don't have to merge this. https://reviews.llvm.org/D30035