Skip to content

Instantly share code, notes, and snippets.

Michael Mayer schnittstabil

Block or report user

Report or block schnittstabil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View buffer-access-benchmark.js
var Benchmark = require('benchmark');
var suite = new Benchmark.Suite;
global.minOps = 1024;
global.undersized = new Buffer(3);
global.exactSize = new Buffer(global.minOps);
function access(buff, size) {
for (var i = 0; i < size; i++) {
buff[i];
@schnittstabil
schnittstabil / isEnabledFor_vs_class_benchmark.py
Created Mar 5, 2014
logging.isEnabledFor vs lazyjoin class benchmark
View isEnabledFor_vs_class_benchmark.py
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("log")
def simple():
if logger.isEnabledFor(logging.DEBUG):
logger.debug(
'Stupid log message ' + ' '.join([str(i) for i in range(20)])
)
You can’t perform that action at this time.