swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

Inline and specialize LambdaHandlers #201

Closed fabianfett closed 3 years ago

fabianfett commented 3 years ago

Add @inlinable to default LambdaHandler implementations. This ensures that those implementations can be inlined into user code and can be specialized for their input and output types.

Motivation:

We like speed.

Modifications:

Result:

In my measurement I see another ~4% performance improvement.