在nodejs上HDF5比python慢得多

2024-09-30 10:34:09 发布

您现在位置:Python中文网/ 问答频道 /正文

在nodejs下,下面的hdf5代码运行大约需要200毫秒。在

hdf5 = require('hdf5').hdf5;
h5lt = require('hdf5').h5lt;
Access = require('hdf5/lib/globals').Access;
start = new Date();
f = new hdf5.File('myhdf5file', Access.ACC_RDONLY);
h5lt.readDataset(f.id, 'Timestamp');
console.log(new Date() - start);

python中的类似代码大约需要1毫秒。在

^{pr2}$

什么能解释如此大的差异?hdf5文件的大小约为2兆字节。我在Linux上运行。在


Tags: newdateaccesslibnodejsrequirestartfile

热门问题