Preheat the oven to 400°F.
Spread pecans on a rimmed baking sheet. Place in oven for 5 to 7 minutes to lightly toast.
Meanwhile, for the spice mixture, in a small bowl combine the sugar, rosemary, salt, black pepper, and cayenne pepper; stir to mix.
In an extra-large bowl, combine the melted butter and vanilla.
Add the toasted pecans to the bowl with butter and vanilla; toss to coat.
Remove the pecans from the oven and add them to the butter and vanilla mixture, tossing to coat.
Add the spice mixture; toss to coat evenly with spices.
Spread coated pecans to the same baking sheet.
Bake for 8 to 10 minutes, until toasted and fragrant, stirring once halfway through.
Sprinkle with additional salt, if desired.
Cool pecans completely; they become more crisp as they cool.
Store cooled pecans in an airtight container up to 1 week.
