cisv 0.0.22 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/benchmark/benchmark.js +1 -2
- package/cisv/cisv_parser.c +2 -2
- package/cisv/cisv_transformer.c +2 -2
- package/package.json +1 -1
package/benchmark/benchmark.js
CHANGED
|
@@ -112,8 +112,7 @@ async function runAllBenchmarks() {
|
|
|
112
112
|
const parser = new cisvParser();
|
|
113
113
|
parser.write(fileBuffer);
|
|
114
114
|
parser.end();
|
|
115
|
-
const
|
|
116
|
-
const specificRow = rows[TARGET_ROW_INDEX];
|
|
115
|
+
const specificRow = parser[TARGET_ROW_INDEX];
|
|
117
116
|
})
|
|
118
117
|
.add('csv-parse (sync)', () => {
|
|
119
118
|
const rows = csvParseSync(fileBuffer);
|
package/cisv/cisv_parser.c
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
#include <sys/time.h>
|
|
14
14
|
#include "cisv_parser.h"
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
#define RINGBUF_SIZE (1 << 16) // 64kb (for memory safe reasons)
|
|
16
|
+
#define RINGBUF_SIZE (1 << 20) // 1 MiB (we may adjust according to needs)
|
|
17
|
+
// #define RINGBUF_SIZE (1 << 16) // 64kb (for memory safe reasons)
|
|
18
18
|
#define PREFETCH_DISTANCE 256
|
|
19
19
|
|
|
20
20
|
struct cisv_parser {
|
package/cisv/cisv_transformer.c
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
#include <immintrin.h>
|
|
10
10
|
#endif
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
#define TRANSFORM_POOL_SIZE (1 << 16) // 64kb (for memory safe reasons)
|
|
12
|
+
#define TRANSFORM_POOL_SIZE (1 << 20) // 1MB default pool
|
|
13
|
+
// #define TRANSFORM_POOL_SIZE (1 << 16) // 64kb (for memory safe reasons)
|
|
14
14
|
#define SIMD_ALIGNMENT 64
|
|
15
15
|
|
|
16
16
|
// Create transform pipeline
|