Which is faster 'res.end(data)' or 'res.write(data);res.end()', why?

Here(click me) is the source code .

I think they are the same speed of execution, they all need to be judged the arguments .

Whats your thought on this ?

res.end(data) ultimately calls res.write(data). The speed difference is going to be minimal compared to server noise, so I would go with the one that semantically makes more sense for your application.

The documentation confirms this

If data is specified, it is equivalent to calling response.write(data, encoding) followed by response.end().