
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
temporal-neural-solver
Advanced tools
⚡ Ultra-fast neural network inference in WebAssembly - sub-microsecond latency
Ultra-fast neural network inference in WebAssembly with sub-microsecond latency targets
# Run instantly without installing
npx temporal-neural-solver demo
# Run performance benchmark
npx temporal-neural-solver benchmark 10000
# Get solver information
npx temporal-neural-solver info
# npm
npm install temporal-neural-solver
# yarn
yarn add temporal-neural-solver
# pnpm
pnpm add temporal-neural-solver
# Interactive demo with performance metrics
npx temporal-neural-solver demo
# Benchmark with custom iterations
npx temporal-neural-solver benchmark 100000
# Make a prediction
npx temporal-neural-solver predict "[0.5, 0.5, ...(128 values)...]"
const { TemporalNeuralSolver, benchmark } = require('temporal-neural-solver');
// Create solver instance
const solver = new TemporalNeuralSolver();
// Single prediction (128 inputs -> 4 outputs)
const input = new Float32Array(128).fill(0.5);
const result = solver.predict(input);
console.log('Output:', result.output); // [0.237, -0.363, 0.336, -0.107]
console.log('Latency:', result.latency_ns); // ~500-5000 nanoseconds
// Batch processing for high throughput
const batchInput = new Float32Array(128 * 1000); // 1000 samples
const batchResult = solver.predict_batch(batchInput);
console.log('Throughput:', batchResult.throughput_ops_sec); // >1,000,000 ops/sec
<script type="module">
import init, { TemporalNeuralSolver, benchmark } from 'https://unpkg.com/temporal-neural-solver/temporal-neural-solver.js';
await init();
const solver = new TemporalNeuralSolver();
const input = new Float32Array(128).fill(0.5);
const result = solver.predict(input);
console.log('⚡ Inference latency:', result.latency_ns, 'nanoseconds');
</script>
import { TemporalNeuralSolver } from 'temporal-neural-solver';
interface PredictionResult {
output: number[];
latency_ns: number;
}
const solver = new TemporalNeuralSolver();
const input = new Float32Array(128).fill(0.5);
const result: PredictionResult = solver.predict(input);
Input Layer (128) → Hidden Layer (32) → Output Layer (4)
↓ ↓ ↓
WebAssembly Loop Unrolling Kalman Filter
Optimization 4x Parallelism Temporal Smoothing
Run benchmarks on your hardware:
npx temporal-neural-solver benchmark 10000
| Metric | Target | Typical |
|---|---|---|
| P50 Latency | <1μs | 2-5μs |
| P90 Latency | <10μs | 5-15μs |
| P99 Latency | <100μs | 10-50μs |
| Throughput | >1M ops/s | 200K-2M ops/s |
| Memory | <1MB | ~500KB |
📊 Native Benchmark Function
10,000 iterations:
Total: 45.23 ms
Avg: 4.52 μs
Throughput: 221,238 ops/sec
⚡ ULTRA-FAST INFERENCE (<10μs)
new TemporalNeuralSolver()Creates a new solver instance with initialized weights and temporal state.
solver.predict(input: Float32Array): PredictionResultRuns inference on a 128-element input array.
Returns:
{
output: number[], // 4-element output array
latency_ns: number // Inference time in nanoseconds
}
solver.predict_batch(inputs: Float32Array): BatchResultProcesses multiple inputs for high-throughput scenarios.
Parameters:
inputs: Flattened Float32Array (length must be multiple of 128)Returns:
{
predictions: number[][], // Array of output arrays
total_latency_ms: number, // Total processing time
avg_latency_us: number, // Average per prediction
throughput_ops_sec: number // Operations per second
}
solver.reset_state()Resets the temporal Kalman filter state.
solver.info(): SolverInfoReturns metadata about the solver configuration.
benchmark(iterations: number): BenchmarkResultRuns a performance benchmark with the specified iterations.
# Run test suite
npm test
# Run comprehensive benchmarks
npm run benchmark
# Interactive testing
npx temporal-neural-solver demo
// Generate time-series input
function generateTimeSeriesInput(t) {
const input = new Float32Array(128);
for (let i = 0; i < 128; i++) {
input[i] = Math.sin(t * 0.1 + i * 0.05);
}
return input;
}
// Process with temporal coherence
const solver = new TemporalNeuralSolver();
for (let t = 0; t < 100; t++) {
const input = generateTimeSeriesInput(t);
const result = solver.predict(input);
// Kalman filter maintains temporal coherence
}
const solver = new TemporalNeuralSolver();
const latencies = [];
// Collect performance metrics
for (let i = 0; i < 1000; i++) {
const input = new Float32Array(128).fill(Math.random());
const result = solver.predict(input);
latencies.push(result.latency_ns);
}
// Analyze performance
const p50 = latencies.sort((a, b) => a - b)[Math.floor(latencies.length * 0.5)];
const p99 = latencies.sort((a, b) => a - b)[Math.floor(latencies.length * 0.99)];
console.log(`P50: ${p50/1000}μs, P99: ${p99/1000}μs`);
We welcome contributions! Check out:
MIT License - See LICENSE file for details.
Built with cutting-edge technologies:
⚡ Experience the future of ultra-fast neural network inference today!
npx temporal-neural-solver demo
FAQs
⚡ Ultra-fast neural network inference in WebAssembly - sub-microsecond latency
We found that temporal-neural-solver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.