Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

a) reading a 100-byte file from an SD card

b) reading a 100-byte file from a hard disk

c) computing the CRC-32 of a 100-byte region in memory

d) computing the area of a triangle whose float coordinates are in memory

e) getting the last-modification time of a file on an SD card

share|improve this question

closed as too broad by Journeyman Geek, afrazier, Mike Fitzpatrick, Sathya Jul 29 '13 at 2:42

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I would guess that it's A, as it involves hardware I/O and SD cards can be quite slow sometimes. –  Renan Jul 29 '13 at 0:26
1  
This would depend on processor, memory, interfaces, SD card class.... MUCH too broad, and dosen't really seem to have much practical value. If you really need to know, why not test it? –  Journeyman Geek Jul 29 '13 at 0:32
    
My guess is that answers to the question may change over time and that may limit the usefulness of this question for future visitors. –  BrianAdkins Jul 29 '13 at 0:37
    
Any pure computation will be fast compared to something that requires "disk" access. Hard to say for SD vs disk, since both are highly variable. But reading mod time of a file is nearly as expensive as reading a file. –  Daniel R Hicks Jul 29 '13 at 0:38
add comment

1 Answer

Assuming modern hardware circa 2010 and later and Nothing Else Crazy(tm):

I/O is going to be slower than memory. That rules out C and D.

SD cards are slower than modern SATA-II disks. That rules out B.

Doing A will involve doing E as part of the file opening process on most operating systems. So A will be slower than E.

My vote is A.

But there are a tremendous number of variables involved in all of this and the question, to be honest, is a horrible homework question. Everyone in the comments is right.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.