Skip to content

Instantly share code, notes, and snippets.

@maestroprog
maestroprog / main.cpp
Created July 22, 2018 19:52
birds calc
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
struct BirdData {
@maestroprog
maestroprog / func_speed.php
Last active May 28, 2017 15:13 — forked from stanlemon/func_speed.php
Test the speed of calling a function in various ways in PHP.
<?php
define('ITERATIONS', 10000000);
function accumulateResults(array &$results, $time, $name)
{
$arguments = substr($name, -1, 1);
$name = substr($name, 0, -2);
$results[$name][$arguments] = $time;
}