I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
| Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
|---|
| defmodule SqlParser do | |
| def run() do | |
| input = "select col1 from ( | |
| select col2, col3 from ( | |
| select col4, col5, col6 from some_table | |
| ) | |
| ) | |
| " | |
| IO.puts("input: #{inspect(input)}\n") | |
| IO.inspect(parse(input)) |
| #!/usr/bin/env ruby | |
| # if limiting to one chapter, ./audiobook.rb 05 | |
| LIMIT = (ARGV[0] =~ /\A[0-9][0-9]\Z/) ? ARGV[0] : false | |
| BASE = Dir.pwd + '/' | |
| NUMS = BASE + 'ChapterNums/' | |
| DRUM = BASE + 'DrumFills/' | |
| GUIT = BASE + 'GuitarChords/' | |
| URLS = BASE + 'URLs/' |
| dialog { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| right: auto; | |
| padding: 30px; | |
| transform: perspective(500px) translate(-50%, -50%); | |
| background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
| border: none; | |
| border-radius: 3px; |
| defmodule LeakyBucket.Bucket do | |
| @moduledoc """ | |
| Simulates a leaky bucket implementation | |
| """ | |
| use GenServer | |
| @initial_amount 0 | |
| @increment_rate 1 | |
| @leak_rate 2 | |
| @leak_interval 500 |
| (module | |
| (func $addTwo (param i32 i32) (result i32) | |
| (i32.add | |
| (get_local 0) | |
| (get_local 1))) | |
| (export "addTwo" (func $addTwo))) |
| #! /usr/bin/env python3 | |
| """Fixing bluetooth stereo headphone/headset problem in debian distros. | |
| Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
| Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
| This will be only fixes the bluez5 problem mentioned above . | |
| Licence: Freeware |
| defimpl Poison.Encoder, for: Timex.DateTime do | |
| use Timex | |
| def encode(d, _options) do | |
| fmt = DateFormat.format!(d, "{ISO}") | |
| "\"#{fmt}\"" | |
| end | |
| end |
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
| Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
|---|
So I built an algorithm that tries to lose tictactoe no matter what. If you'd like to battle your algorithm against mine, I think it would be fun. This is the spec of what your server should accept & return. If you built an algorithm that can beat it, please tweet me @bunsen.
Your server should accept GET requests with the following parameters:
rowcolmarkgrid - will be a url encoded array, like this: [["x",%20"x",%20nil],%20[nil,%20nil,%20"o"],%20[nil,%20"o",%20nil]]It should return JSON that looks like this:
| defmodule BTree do | |
| defstruct tree: nil | |
| def new(e), do: %BTree{tree: {e, nil, nil}} | |
| def insert(%BTree{tree: root}, element) do | |
| %BTree{tree: do_insert(root, element)} | |
| end | |
| defp do_insert(nil, element) do |