Skip to content

Instantly share code, notes, and snippets.

@joaner
joaner / main.js
Last active September 13, 2018 06:28
crypto comparison of algorithms
#!/usr/bin/env node
const crypto = require('crypto')
const content = 'helloworld'
const password = 'password'
const algorithms = crypto.getCiphers()
for (const algorithm of algorithms) {
try {
const cipher = crypto.createCipher(algorithm, password)
@joaner
joaner / README.md
Last active June 7, 2018 06:29
computed performance: python3 vs nodejs10

performance test

Calculate the sum of the arrays first, and repeat it for 10,000,000 times to get the final sum.

$ time node test.js
551999999.9312276
node test.js  0.65s user 0.03s system 99% cpu 0.688 total

$ time python test.py