coffee CLI
real 0m0.124s
user 0m0.102s
sys 0m0.022s
{ | |
"name": "bench", | |
"version": "0.0.2", | |
"repo": "brendanashworth/bench", | |
"description": "Easy to use, beautiful-looking benchmarking library", | |
"keywords": ["benchmark", "bench", "speed"], | |
"license": "MIT", | |
"src": ["bench.h", "bench.c"] | |
} |
total = 0 | |
for num in [1..5000] | |
total += num | |
console.log total |
$ vagrant init hashicorp/precise32 | |
$ vagrant up |
$ vagrant ssh |
// Middleware for attaching the Handlefiles engine to ExpressJS | |
// Kind of hacky, since we attach it directly to express/lib/response | |
var path = require('path'); | |
var handlefiles = require('handlefiles'); | |
var Response = require('express/lib/response'); | |
var viewDirectory = path.join(__dirname, '..', 'views'); | |
/** | |
* Configures Express to use the correct view engine. |
var validator = require('artisan-validator')(); | |
validator.try(... function(errors) { | |
var msg = Object.keys(result.errors).map(function(name) { | |
return result.errors[name].join(' '); | |
})[0]; | |
}); |
var time = 1e3; | |
function benchBinding() { | |
console.time('bench-binding'); | |
for (var i = 0; i < time; i++) { | |
var Process = process.binding('process_wrap').Process; | |
var WriteWrap = process.binding('stream_wrap').WriteWrap; | |
var uv = process.binding('uv'); |
// Licensed io.js code | |
posix.relative = function(from, to) { | |
assertPath(from); | |
assertPath(to); | |
from = posix.resolve(from).substr(1); | |
to = posix.resolve(to).substr(1); | |
function trim(arr) { | |
var start = 0; |
#include <node.h> | |
#include <stdio.h> | |
using namespace v8; | |
void Exit(void* arg) { | |
printf("node::AtExit called\n"); | |
} | |
void Initialize(Handle<Object> exports) { |