Actually, yes, in very loose terms. Higher octane burns cooler which is why it's needed to prevent pinging.
But if the octane is too high, it will foul your plugs. Too low, and it will burn them.
Some people think they should use higher octane in the winter, but this is wrong, If anything...