|
From: Humufr <hu...@ya...> - 2005-02-14 01:09:29
|
>It looks like the reason the columns version of load is faster is
>because it's not doing anything...
It' not exactly true. I'm agree that the change is not big, but the
difference comes from this two lines:
#row = [val for val in line.split()] #no change in float for all values
row = line.split() # dont need the loop so forgot the precedent line
row = [float(row[i]) for i in columns] # float value
and in a fact there are a condition if:
the first is to keep exactly the same function than yours. The second
part is to not transform all the element in float but only the columns
choose and this change explain the difference...
Regards,
Nicolas
|