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
Benchmark code at: https://github.com/nathanmarz/specter/blob/master/scripts/benchmarks.clj | |
Run against Clojure 1.7.0 and Java 1.7.0 on Mac OSX 10.11.6 | |
Benchmark: get value in nested map (2500000 iterations) | |
Avg(ms) vs best Code | |
53.528 1.00 (-> data (get :a) (get :b) (get :c)) | |
54.708 1.02 (-> data :a :b :c) |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
var ( |
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
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
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
{ | |
http_port 8080 | |
https_port 8443 | |
# debug | |
security { | |
authentication portal myportal { | |
crypto default token lifetime 3600 | |
crypto key sign-verify {env.JWT_SHARED_KEY} | |
backend local {env.HOME}/.local/caddy/users.json local |
OlderNewer