Use io.Writer instead of []byte in Render() method
Discussing with the great developer @valyala in thread https://github.com/valyala/quicktemplate/issues/58 about the amazing Authboss he gave us a suggestion to optimize a bit: https://github.com/valyala/quicktemplate/issues/58#issuecomment-517854569
As for the performance ... superfluous memory allocation when returning the byte slice from
bytes.Buffer. The memory allocation could be avoided ifRender()could acceptio.Writerto write template output to.`
Can we just use io.Writer instead of []byte in Render() method?
Although he's correct, the main reason for this to exist is to enable a JSON renderer which doesn't accept an io.Writer anywhere. I'm really not opposed to the change, but it would have to be a RenderWriter interface we upgrade to from a Renderer otherwise it'd break backwards compatability. I'd accept a PR for this, will not implement it myself.