ffjavascript
Advanced tools
Comparing version 0.2.20 to 0.2.21
{ | ||
"name": "ffjavascript", | ||
"type": "module", | ||
"version": "0.2.20", | ||
"version": "0.2.21", | ||
"description": "Finite Field Library in Javascript", | ||
@@ -36,3 +36,3 @@ "main": "./build/main.cjs", | ||
"big-integer": "^1.6.48", | ||
"wasmcurves": "0.0.10", | ||
"wasmcurves": "0.0.11", | ||
"worker-threads": "^1.0.0" | ||
@@ -39,0 +39,0 @@ }, |
@@ -308,2 +308,3 @@ import {log2, buffReverseBits} from "./utils.js"; | ||
const MAX_CHUNK_SIZE = 1<<16; | ||
const MIN_CHUNK_SIZE = 1<<4; | ||
@@ -361,7 +362,11 @@ let fnName; | ||
let chunkSize = Math.floor(nPoints /tm.concurrency); | ||
if (chunkSize < MIN_CHUNK_SIZE) chunkSize = MIN_CHUNK_SIZE; | ||
if (chunkSize > MAX_CHUNK_SIZE) chunkSize = MAX_CHUNK_SIZE; | ||
const opPromises = []; | ||
for (let i=0; i<nPoints; i += MAX_CHUNK_SIZE) { | ||
for (let i=0; i<nPoints; i += chunkSize) { | ||
if (logger) logger.debug(`${loggerTxt}: fftJoinExt Start: ${i}/${nPoints}`); | ||
const n= Math.min(nPoints - i, MAX_CHUNK_SIZE); | ||
const n= Math.min(nPoints - i, chunkSize); | ||
@@ -374,3 +379,2 @@ const firstChunk = Fr.mul(first, Fr.exp( inc, i)); | ||
task.push({cmd: "ALLOC", var: 0, len: sMid*n}); | ||
@@ -391,3 +395,4 @@ task.push({cmd: "SET", var: 0, buff: b1}); | ||
{var: 2}, | ||
{var: 3} | ||
{var: 3}, | ||
{val: Fr.s}, | ||
]}); | ||
@@ -394,0 +399,0 @@ if (fnMid2Out) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
740858
13914
+ Addedwasmcurves@0.0.11(transitive)
- Removedwasmcurves@0.0.10(transitive)
Updatedwasmcurves@0.0.11