Skip to content

Instantly share code, notes, and snippets.

View timokoessler's full-sized avatar

Timo Kössler timokoessler

View GitHub Profile
@timokoessler
timokoessler / test.js
Created July 1, 2023 13:57
Performance of cidr-matcher vs. netparser vs. array
const CIDRMatcher = require('cidr-matcher');
const netparser = require("netparser");
function generateRandomIP() {
let ip = [];
for (let i = 0; i < 4; i++) {
ip.push(Math.floor(Math.random() * 255));
}
return ip.join(".");
}

Keybase proof

I hereby claim:

  • I am timokoessler on github.
  • I am timokoessler (https://keybase.io/timokoessler) on keybase.
  • I have a public key ASBq15TdQLE-q8XzSk6SzZsgm-zKtKgQtBr7BfkMVtoPXQo

To claim this, I am signing this object: