Skip to content

ServiceBuilder vs Tuples for composing layers #3397

Answered by jplatte
kyle-leonhard asked this question in Q&A
Discussion options

You must be logged in to vote

Runtime performance after optimizations is going to be exactly the same (probably w/o optimizations too). I personally prefer the tuples because they're less verbose and don't lead to typenames going out of control (relevant in compiler error messages). They're newer though, which is one of the main reasons the docs use ServiceBuilder.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@kyle-leonhard
Comment options

@kyle-leonhard
Comment options

@mladedav
Comment options

mladedav Jul 4, 2025
Collaborator

@kyle-leonhard
Comment options

@yanns
Comment options

yanns Jul 8, 2025
Collaborator

Answer selected by kyle-leonhard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants