Is there a way to quickly compare before and after in Darktable?
I know how it can be done using the snapshot panel, but is there a way to do it faster?
The standard Undo and Redo keyboard shortcuts (Ctrl-Z and Ctrl-Y on Windows and Linux, CMD-Z and CMD-shift-Z on Apple) operate in Darktable - at least, they do running in Ubuntu : I haven't checked the other OSs. More Darktable shortcuts here.
If you're looking for a way to view the image with and without a specific module effect, each module has a "power switch" at its top left corner, so each module - or several - can be switched on or off.
More details on modules (including activating and deactivating them) here.
If you're looking to compare before and after side by side as two images, it looks like that isn't yet in the main distributions of Darktable, though there's a discussion about that here.