Literals are faster and more idiomatic. Backport of 0d74c41981687598d3fa0a7eb9712ce4c387ca19 from master