FYI: If you're not low on storage at the moment, checking the optimize option will not (in most cases) reduce your space usage right away. The phone will wait until you need the space and as you do it will swap the fullsize photo with a thumbnail. When you click on a photo that has been optimized, your phone will download a medium size photo for better viewing. The fullsize will only download when you click edit or send the photo to someone.
If you would like to save space now, verify all photos have been uploaded by looking at the bottom of the Photos tab or looking in Settings-iCloud-Photos. Once you verify you can turn iCloud Photo Library off. You will delete the photos from your device but this will only remove the photos that are in a reduced format. Fullsize photos will need to be removed manually. Once done, clear your deleted photos folder. You will now have a phone with no photos. Turn the iCloud Photo Library option on again and set optimized as your preference. This will download thumbnail sized photos to your phone and in turn give you the difference in space. Any questions, let me know.