Hermione’s death didn’t even accomplish much: she wasn’t saving the life of another student for example (a student getting in the way of the troll would have been an obvious thing to matter)
I expect that would have helped a lot, especially if Hermione successfully rescued said hypothetical student (Harry may have killed the troll, but he failed at the whole rescue thing). We don’t really know what Hermione was doing before running into the troll, or how it so quickly went from in the dungeons to on a terrace, or how the troll got into the dungeons rather than a more obvious way in to Hogwarts (was Hermione going to the dungeons? The Ravenclaw girls’ dorms? Somewhere else entirely?).
I expect that would have helped a lot, especially if Hermione successfully rescued said hypothetical student (Harry may have killed the troll, but he failed at the whole rescue thing). We don’t really know what Hermione was doing before running into the troll, or how it so quickly went from in the dungeons to on a terrace, or how the troll got into the dungeons rather than a more obvious way in to Hogwarts (was Hermione going to the dungeons? The Ravenclaw girls’ dorms? Somewhere else entirely?).