【发布时间】:2021-04-16 00:02:06
【问题描述】:
我注意到使用 CSV.read 加载 CSV 文件非常慢。
作为参考,我附上了一个时间基准的例子:
using CSV, DataFrames
file = download("https://github.com/foursquare/twofishes")
@time CSV.read(file, DataFrame)
Output:
9.450861 seconds (22.77 M allocations: 960.541 MiB, 5.48% gc time)
297 rows × 2 columns
这是一个随机数据集,与 Julia 相比,此类操作的 Python 替代品编译时间短。既然,julia 比 python 快,为什么这个操作要花这么多时间?另外,有没有更快的方法来减少编译时间?
【问题讨论】:
-
我认为这是 Julia 1.5?
-
@OscarSmith 是的,我正在使用 Julia 1.5.3
-
我认为python中的类似操作不会进行任何编译。那么在 python 中谈论更快的编译可能是不准确的。
标签: performance csv time julia benchmarking