cisv 0.0.21 → 0.0.23

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.
@@ -1,19 +1,7 @@
1
1
  'use strict';
2
- let cisvParser;
3
-
4
- try {
5
- // from calling benchmark from ./ root
6
- cisvParser = require('../build/Release/cisv');
7
- } catch (error1) {
8
- try {
9
- // from calling on npm publish ../pkg/
10
- cisvParser = require('../../build/Release/cisv');
11
- } catch (error2) {
12
- // Handle the error if both attempts fail
13
- console.error("Failed to load module from either relative path:", error1, error2);
14
- throw new Error("cisv module could not be found in '../build/Release' or '../../build/Release'");
15
- }
16
- }
2
+ // direct node ./benchmark/benchmark.js
3
+ // means you have to call from :../build/Release/cisv
4
+ const { cisvParser } = require('../../build/Release/cisv');
17
5
  const { parse: csvParseSync } = require('csv-parse/sync');
18
6
  const { parse: csvParseStream } = require('csv-parse');
19
7
  const Papa = require('papaparse');
@@ -13,8 +13,8 @@
13
13
  #include <sys/time.h>
14
14
  #include "cisv_parser.h"
15
15
 
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)
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 {
@@ -9,8 +9,8 @@
9
9
  #include <immintrin.h>
10
10
  #endif
11
11
 
12
- //#define TRANSFORM_POOL_SIZE (1 << 20) // 1MB default pool
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cisv",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "The fastest csv parser of the multiverse",
5
5
  "author": "sanix<s4nixd@gmail.com>",
6
6
  "main": "./build/Release/cisv.node",