As for the barrel effect on the SX40 HS and the S100, check out this link, where there is a comparison between the two cameras. Here, the SX40 HS seems to come out slightly on top. [URL="http://forums.dpreview.com/forums/read.asp?forum=1010&message=40868323"/URL]
Furthermore, though I haven't tried it, the SX40 HS is capable of taking RAW shots with the addition of CHDK.
Another fact you should be aware of, if you don't already know it, is that the S100 does not have any viewfinder, but only an LCD, while the SX40 HS has an electronic viewfinder. True, some people does not care for a viewfinder, however, it is very good to have in bright sunlight, or for that matter, it really does help in stabilizing the camera. As far as I'm concerned, a viewfinder is a must, in order to be able to take good photos regardless of the light situation.
Furthermore the SX40 HS has a fully articulated screen, while that's not the case with the S100. This is really a nice feature, since you can get great pictures in angles that would have been quite difficult to get into otherwise. When not in use, the screen is turned with the backside out, in order to protect it. Another thing with the LCD is that it's possible to turn it forward, which can be very useful if taking photos and being in front of the camera yourself, such as group photos, or videos or something else.
Regarding the image quality, check out the Best photo threads of the cameras available in this forum, that should give you a really good view of what qualities they are capable of.
The macro seems to be better in the SX40 HS. Again, in the Best shots thread you can see some photos in macro which is really great.
Can't say anything about which of them is better at autofocus, but at times the SX40 at least takes a little while to get it right. After playing around with it for a while though I think this has to do with technique rather than the camera itself. I might be wrong though.
There are some other features differing between them, but I have tried to keep to only the ones you were wondering about.
As for size, yes, the S100 is much smaller and easier to carry around.
Speaking of zoom, the SX40 HS is definitely far better than the S100. It's really amazing what type of photos you can shoot using it.
So, in the end, it's up to you to pick the one that best suits you, depending on what you value most.
Good luck with whatever camera you choose. 
/T.J.