analogRead() on galileo gen 2

I am using analogRead() to read analog voltages provided on A4 pin on galileo gen 2 but the sampling rate is very low, not at all enough for power monitoring(my little project). Is it maybe because I'm using windows? Will it be faster if I ran it in Linux (ubuntu)?

Two things: are you talking about your board os or your terminal os? Define how slow.

Ive read galileo 1 had slow speed for toggling io and sampling analog, dont know if they fixed this.

Im not a fan of galileo boards either, id rather separate real time functions from processing, (arduino + raspy or arduino yun).

Thanks mart256 for your reply..I am talking about terminal OS. I am running it in windows 8.1.

It is slow in the sense its sampling rate is very low, about 500 samples per second whereas the expected rate is around 1 million samples per second. I can't find any clock prescaler syntax for the on-board ADC. I read that the AVR core ADCs on other arduino boards don't have such problem since they can be prescaled via some commands, which sadly don't work for Galileo's Texas Instruments ADC. Also some people said its slowing down due to software latency and I2C expander(which I didn't understand at all) What should I do? Is there any way?