Skip to content

Instantly share code, notes, and snippets.

@faultier
faultier / bench.c
Last active August 29, 2015 14:04
HTTP parser benchmark
#include "http_parser.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
static int finished = 0;
int message_begin_cb(http_parser *parser) {
return 0;
}
#!/usr/bin/env ruby
# coding: utf-8
module HQ9Plus
class Interpreter
NAME = 'RHQ9+'
attr_accessor :interactive
def initialize
#!/usr/bin/env ruby
class String
alias :m :gsub
def b
puts self
end
end
(['-','-']*'-'.m('-','q')).m('-','^').b
#!/usr/bin/env ruby
# coding: utf-8
require 'net/http'
require 'time'
def show(path, res)
puts "---- #{path} ----"
puts "Response: #{res.code} #{res.message}"
puts "Content-Length: #{res['Content-Length']}"
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/../lib";
use HTTP::Engine;
use HTTP::Engine::Middleware;
use Udon::App;
#!/usr/bin/env ruby
# vim: encoding=utf-8 filetype=ruby
require 'rubygems'
require 'optparse'
require 'yaml'
options = YAML.load(<<CONF)
color: true
verbose: false
# filetype=ruby fileencoding=utf8
framework 'MacFUSE'
class NamakeFS
STRING = '寒いので冬眠したい'
PATH = '/honne.txt'
def contentsOfDirectoryAtPath(path, error:error)
return [ PATH.lastPathComponent ]
# vim: fileencoding=utf-8 filetype=ruby
require 'rack'
require 'stringio'
require 'ruby2ruby'
require 'esoteric/dt'
module Esoteric
module DT
class Server
*.swp
.DS_Store
*.o
array_map
thread_test
concurrent
string_benchmark
eval($s=join("",qw{$t=1;$s=~/\[[0-9,]+\]/;$n=eval($&);$e='eval$s=%w'.chr(39).'t=
true;e="eval($s=join( "<<34<<34<<",qw{$t=1;$s= ~/"<<92<<"[[0-9,]+"<<
92<<"]/;$n=eval($&) ;$e="<<3 9<<"eval$s=%w"<<39 <<". chr(39)."<<39<<
($s+(($s.length>17 56)?"":"#"<<$ s.gsub (/[^0-9a-zA- Z]/,"")[0,(17
55-$s.length)])); e[-312,311]=""<<3 9<<";$e.=("<<39<< "#"<<39<<".
substr(join("<<3 9<<39<<",split(/[^0-9 a -zA-Z]/,$s)),0,(200 9-length(
$s)))).chr(39)." <<39<<".join"<<39<<";@o =map{$t=!$t;split(//, ((!$t)?s
ubstr($e,0,$_," <<39<<39<<"):chr(32)x$_ ))}@$n;for(1 . .34){spl
ice(@o,$_*81,0, chr(10))};print(join("< <39<<39<< ",@o).chr
(10))}))";o=[1 01,10,24,4,40 ,3 , 8,4,18,3,