These are animation helpers, which let you view and optimize your animations (by reducing their size). We gathered “Optimize (Difference)” and “Optimize (GIF)” filters together, because they are not much different.
An animation can contain several layers and so its size can be important. This is annoying for a Web page. The Optimize filters let you reduce this size. Many elements are shared by all layers in an animation; so they can be saved only once instead of being saved in all layers, and what has changed in each layer can be saved only.
GIMP offers two Optimize filters: Optimize (Difference) and Optimize (GIF). Their result doesn't look very different.