Venkatesh-Prasad Ranganath
1 min readJun 21, 2019

--

For a fine grained performance evaluation, I agree one needs to consider numerous other factors. However, since I was interested in out-of-the-box performance, I did not consider the effect of caching and other factors.

Assuming different language runtimes implement IO in similar manner, the effect of hardware memory/disk caching on similar IO operations in different languages will likely be similar.

Since the random content is written into a file before it is read, the caching of the written content can only influence immediate reading of the file and no subsequent reads of the file in both the same and different programs. Further, the measurements from the first run is discarded to exclude outliers due to “warm-up” skews.

As for disk mounting options, the system default was used. So, unless the IO implementation in language runtimes are sensitive to async/sync mount options of the disk, this aspect will not affect the observations. If the runtimes are sensitive to this aspect, then the observations are still valid in terms of out-of-the-box performance.

As for chunk size, data was written one byte at a time in buffered mode deferring any optimization due to chunking and buffer sizes to the underlying IO library implementation. Again, the focus being on out-of-the-box performance.

Lastly, the observations were similar on a Rasp Pi and a Linux desktop which are significantly different in terms of hardware architecture.

So, I think the observations are a good measure of out-of-the-box buffered IO performance in various languages.

--

--

Venkatesh-Prasad Ranganath
Venkatesh-Prasad Ranganath

Written by Venkatesh-Prasad Ranganath

Engineer + Researcher curious about software and computing.

No responses yet