Based on my experience by taking calls for tech help the LG G3 is much better android device than anything out right now. I get a lot of complaints about the S5 overheating and freezing up a lot.

The processors have different names but they are both Quad core, 2500 MHz, Krait 400.
They both have the same Graphics Processor : Adreno 330
One of the major differences is in the system memory, the GS5 has 2GBs where as the LG G3 has 3GBs.
When it comes to battery life the GS5 has about 2hrs more talk time than the G3, but the G3 has built-in wireless charging which I would sacrifice the 2hrs in order to just place my phone down on my nightstand rather than fiddle with a charger. Also the S5 only has 16.2 days of stand-by time, where as the G3 has 22.8 days meaning that more often than not the G3 will need to be charged less often.

Camera's

G3
13 megapixels (rear)
2.1 megapixels (front)

Features: Dual LED Flash, Back-illuminated sensor (BSI), Autofocus, Touch to focus, Optical image stabilization, Face detection, Smile detection, ISO control, Burst mode, Geo tagging, High Dynamic Range mode (HDR), Panorama, and Voice activation.

S5
16 megapixels (rear)
2.1 megapixels (front)

Features: Autofocus, Phase detection autofocus, Touch to focus, Manual focus, Digital image stabilization, Face detection, Exposure compensation, ISO control, White balance presets, Burst mode, Digital zoom, Geo tagging, High Dynamic Range mode (HDR), Night mode, Scenes, Effects, Self-timer, and Voice activation.

Looking at the above you may think that the S5 has the G3 camera beat, however Samsung has yet to make any important modifications to their camera software meaning that half of the features shown barely work.
To see what the s5 and g3 can do at a medium distance click here.
To see what the s5 and g3 can do at close up click here.