How does a case-insensitive filesystem access files?

Operating systems generally work with handles. An "open" function is called, which specifies the filename, and a handle is returned. Further I/O calls take a handle, not a filename.

Other functions that require file name would be creating files, listing a directory, and deleting files.

So any performance hit with dealing with case insensitivity is not really going to affect much actual I/O, just file management.

Some programs use lock files to indicate resources are in use. This could translate to a lot of creates and deletes.

However, the overhead of doing two comparisons instead of one is likely a matter of a few additional assembly language instructions. Meaning less than 50 or so cycles. Maybe 500 or 5000 if cache misses come into play.

It's really, really not worth worrying about unless you literally are worried about the performance of creating/deleting billions of files in a short amount of time. High disk I/O applications include things like databases, and databases typically open a few very large files and keep them open while the database is being used. So those sorts of applications - one that typically requires all the disk I/O that there is - do not make a lot of calls where the filename has to be parsed.

The speed of the medium is going to be a bottleneck far before the time in dealing with filenames even approaches it.

Tags:

Filesystems