This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Loop-the-loop #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or 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
const std = @import("std"); | |
const assert = std.debug.assert; | |
const mem = std.mem; | |
pub const Token = struct { | |
id: Id, | |
start: usize, | |
end: usize, | |
pub const Keyword = struct { |
This file contains hidden or 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
~/Scratch/tw-short master* | |
❯ wrk -s post.lua http://short.itsbth.com/ | |
Running 10s test @ http://short.itsbth.com/ | |
2 threads and 10 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 32.53ms 19.13ms 261.01ms 96.67% | |
Req/Sec 160.37 29.53 202.00 74.00% | |
3199 requests in 10.01s, 817.30KB read | |
Requests/sec: 319.59 | |
Transfer/sec: 81.65KB |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Bound method showdown</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or 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
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = undefined; | |
var _react = require("react"); | |
var _react2 = _interopRequireDefault(_react); |
This file contains hidden or 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
#!/usr/bin/python3 | |
import logging | |
def rle(iterable): | |
_next = next | |
it = iter(iterable) | |
value, count = None, 0 | |
try: | |
while True: | |
item = _next(it) |
This file contains hidden or 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
from __future__ import print_function | |
# def is_palindrome(n): | |
# s = str(n) | |
# return s == s[::-1] | |
# mv = 0 | |
# for i in range(999, 100, -1): | |
# for j in range(999, 100, -1): | |
# m = i * j |
This file contains hidden or 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
from __future__ import print_function | |
# def is_palindrome(n): | |
# s = str(n) | |
# return s == s[::-1] | |
# mv = 0 | |
# for i in range(999, 100, -1): | |
# for j in range(999, 100, -1): | |
# m = i * j |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
{"L": {"i": {"d": {"i": {"a": {"'": {"s": {}}}}}, "b": {"e": {"r": {"i": {"a": {"'": {"s": {}}, "n": {"'": {"s": {}}, "s": {}}}}, "a": {"c": {"e": {"'": {"s": {}}}}}}}, "b": {"y": {}}, "y": {"a": {"'": {"s": {}}, "n": {"'": {"s": {}}, "s": {}}}}, "r": {"i": {"u": {"m": {"'": {"s": {}}}}}, "a": {"'": {"s": {}}, "s": {}}, "e": {"v": {"i": {"l": {"l": {"e": {"'": {"s": {}}}}}}}}}}, "t": {"h": {"u": {"a": {"n": {"i": {"a": {"'": {"s": {}}, "n": {"'": {"s": {}}, "s": {}}}}}}}}, "t": {"o": {"n": {"'": {"s": {}}}}, "l": {"e": {"'": {"s": {}}}}}}, "m": {"o": {"u": {"s": {"i": {"n": {"'": {"s": {}}}}}}, "g": {"e": {"s": {}}}}, "a": {"'": {"s": {}}}, "b": {"a": {"u": {"g": {"h": {"'": {"s": {}}}}}}, "u": {"r": {"g": {"e": {"r": {}}}}}}, "p": {"o": {"p": {"o": {"'": {"s": {}}}}}}}, "e": {"g": {"e": {"'": {"s": {}}}}, "b": {"f": {"r": {"a": {"u": {"m": {"i": {"l": {"c": {"h": {}}}}}}}}}, "e": {"r": {"m": {"a": {"n": {"'": {"s": {}}}}}}}}, "c": {"h": {"t": {"e": {"n": {"s": {"t": {"e": {"i": {"n": {"'": {"s": {}}}}}}}}}}} |
This file contains hidden or 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 sys | |
import pickle | |
from collections import defaultdict | |
def tree(): | |
return defaultdict(tree) | |
class Trie(object): |
NewerOlder