Created
August 20, 2019 11:06
-
-
Save Oipo/eac59b252a9b3ec6c7d16968d090ec6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CensorSensor } from 'censor-sensor'; | |
declare function require(name:string); | |
const { PerformanceObserver, performance } = require('perf_hooks'); | |
//import { performance } from 'perf_hooks'; | |
const censor = new CensorSensor(); | |
let start = performance.now(); | |
for(let i = 0; i < 10000000; i++) { | |
censor.isProfane("this is bollocks"); | |
} | |
let end = performance.now() - start; | |
console.log(`time: ${end}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment