The runtime on this isn't horrible, but it is still linear in the number of columns (though not so linear in the number of rows).Considering you are looping over the rows, how do you expect your run time to not be at least linear in the number of rows?
Also, considering you are reading in the entire line, you cannot really beat any linearity on the number of columns. In fact, reading in your entire file makes the program at least linear in the size of the data - and considering that each row and each column is represented by at least one character in the data, your running time is at least linear in the product of the number of rows and columns.
Not that this is bad. All I want to point is that being linear in the number of columns is actually very typical for any program reading tabular data.
In reply to Re: CSV Columns: Friend or foe?
by JavaFan
in thread CSV Columns: Friend or foe?
by dekul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |