Toast the pecans: In a skillet over medium heat, melt the butter.
Add the chopped pecans and a pinch of salt. Cook, stirring often, for 4–6 minutes until fragrant and lightly toasted. Remove from heat and let cool.
Reserve 1–2 tablespoons of the buttery pan drippings for extra flavor, if you like.
Warm the dairy: In a saucepan, add heavy cream and almond milk. Heat over medium until steaming but not boiling. Reduce heat to low.
Whisk the yolks and sweetener: In a bowl, whisk egg yolks with the sweetener until pale and slightly thickened.
If using xanthan gum, sprinkle it in and whisk well to avoid clumps.
Temper the yolks: Slowly drizzle about 1 cup of the hot cream mixture into the yolk mixture, whisking constantly. This prevents scrambling.
Cook the custard: Pour the tempered mixture back into the saucepan. Cook over low heat, stirring with a spatula, until it thickens slightly and coats the back of the spoon (170–175°F).
Do not let it boil.
Flavor the base: Remove from heat. Stir in vanilla, butter extract (if using), a pinch of salt, and the reserved buttery drippings from the pecans. Taste and adjust sweetness or salt.
Chill completely: Strain the custard through a fine mesh sieve into a clean bowl to catch any bits.
Cover and chill in the fridge until very cold, at least 3–4 hours or overnight.
Churn: Pour the cold custard into your ice cream maker and churn according to the manufacturer’s directions, usually 20–25 minutes. Add the toasted pecans in the last 3–5 minutes of churning.
Freeze to set: Transfer the soft ice cream to a lidded container. Freeze for 2–4 hours until firm enough to scoop.
No-churn option: Chill the custard as directed.
Fold in the toasted pecans, then pour into a loaf pan. Cover tightly and freeze 4–6 hours, stirring every hour for the first 3 hours to reduce iciness.