Skip to content

Conversation

@nigrosimone
Copy link
Contributor

@nigrosimone nigrosimone commented Jan 6, 2026

Copy link
Collaborator

@waghanza waghanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this 🎉

Could you please explain the differences between send and end ?

Please notice also that this project is not about performance only, but show indicators for each framework (performance is one of them, but not the only one)

@nigrosimone
Copy link
Contributor Author

nigrosimone commented Jan 6, 2026

res.end() is low-level http.ServerResponse method, ends the response as-is, with no extra logic (minimal overhead).

res.send() Is an Express helper

Adds a lot of convenience:

  • Automatically sets Content-Type
  • Serializes objects to JSON
  • Sets Content-Length
  • Handles default status codes
  • Ends the response for you

@waghanza
Copy link
Collaborator

waghanza commented Jan 6, 2026

Then I think we should keep send.

Indeed, send seems more accurate that end on production builds.

@nigrosimone
Copy link
Contributor Author

Indeed, send seems more accurate that end on production builds.

Yep, if the goal is not to achieve maximum performance, res.send() it is more correct

@nigrosimone nigrosimone closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants