Skip to content

Instantly share code, notes, and snippets.

@bkudria
bkudria / gist:7556
Created August 27, 2008 18:48 — forked from pauldix/gist:7549
require 'benchmark'
require 'rubygems'
require 'json'
require 'yaml'
include Benchmark
benchmark_iterations = 1
large_single_dimension_array = [42, 123.123, :foobar] * 5000
large_single_dimension_hash = {}
10000.times do |i|
<?php
namespace ynd\thsx\core;
class Router {
protected $prefix;
protected $routes;
// Used in specificity calculations.
const MAX_PATH_SEGMENTS = 10;
public function __construct($routes, $prefix = NULL) {
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Seon-Wook Park</author>
</meta>
<bindings>
<select itemPath="feed.entry" produces="XML">
<inputs>
<key id='url' type='xs:string' paramType='variable' required='true' />
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^class @?([a-zA-Z_$.][0-9a-zA-Z_$.]*)( extends [a-zA-Z_\$][0-9a-zA-Z_$.]*)?$/\1/c,class/
--regex-coffee=/^[ \t]*(@|this\.)([a-zA-Z_$][0-9a-zA-Z_$]*).*$/\2/e,export/
--regex-coffee=/^[ \t]*@?([a-zA-Z_$][0-9a-zA-Z_$]*)[ \t]+:.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$][0-9a-zA-Z_$]*)[ \t]+=.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$][0-9a-zA-Z_$]*)[ \t]+=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@?([a-zA-Z_$][0-9a-zA-Z_$]*):.*$/\1/p,property/
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=.*->.*$/\1/f,function/
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=[^->\n]*$/\1/v,variable/