cup unsalted butter (1 stick), at room temperature, plus more for greasing the pan
large sweet potatoes (about 4 pounds), scrubbed
large eggs, at room temperature
(14-ounce) can sweetened condensed milk
cup granulated sugar
teaspoon vanilla extract
teaspoon kosher salt
- Prepare the filling: Heat oven to 350 degrees. Grease a 9-by-13-inch baking dish with butter and line a baking sheet with aluminum foil.
- Poke the sweet potatoes all over with a fork and place on the baking sheet. Bake until soft, about 1 hour; let cool.
- When sweet potatoes are cool enough to handle, peel them using a knife, then add the flesh to a large bowl (or the bowl of a stand mixer fitted with the paddle attachment) and mash with a potato masher or fork.
- Add the 1/2 cup butter, eggs, condensed milk, granulated sugar, vanilla and salt to the bowl. Combine well with a hand mixer or a stand mixer on medium speed. Add the mixture to the prepared baking dish and, using a spatula, smooth out the top.
- Prepare the topping: In a medium bowl, stir together the pecans, cornflakes (if using), brown sugar, flour and butter until thoroughly combined. Spoon the topping evenly over the sweet potatoes.
- Bake the casserole until slightly browned, about 35 minutes. Remove the casserole from the oven and add the marshmallows in an even layer. Return to the oven and bake until marshmallows are toasty and melted, about 5 minutes. Let sit for 5 minutes before serving.