Skip to content

Instantly share code, notes, and snippets.

@cameron314
cameron314 / Main.as
Created November 13, 2011 05:33
PNGEncoder2 benchmark source
package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import ru.inspirit.encoders.png.PNGEncoder;
import flash.system.ApplicationDomain;
import com.adobe.images.PNGEncoder;
import mx.graphics.codec.PNGEncoderAsync;
@cameron314
cameron314 / stabtest.cpp
Last active November 26, 2023 01:44
Simple stability test that I whipped up for exercising my lock-free queue. Compile with g++ -std=c++11 -DNDEBUG stabtest.cpp -O3 -pthread
#include "readerwriterqueue.h"
using namespace moodycamel;
#include <exception>
#include <fstream>
#include <thread>
#include <cstdlib> // rand()
#include <unistd.h> // usleep()
// Compile with g++ git-last-commits.cpp -std=c++11 -O3 -g -DNDEBUG -o git-last-commits -Ilibgit2-0.23.1/include -Llibgit2-0.23.1/build -lgit2 -lz -pthread
#include <git2.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <cerrno>
#include <map>