"Instead of defining a callback, the collisionResponse property of a sprite can be set directly to one of the four collision response types. This will be faster, as the lua function will not need to be called, but does not allow for dynamic behavior."
You can just write mySprite.collisionResponse = x where x is one of
playdate.graphics.sprite.kCollisionTypeSlide
playdate.graphics.sprite.kCollisionTypeFreeze
playdate.graphics.sprite.kCollisionTypeOverlap or
playdate.graphics.sprite.kCollisionTypeBounce.
You would set the property to a function returning one of these four if the collision type for the sprite can vary at runtime. If it's constant, assigning the value directly is faster.