View kagbuildnumber.cpp
This file contains 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
#include <cstdlib> | |
#include <cstdio> | |
int StringEqualUntil(const char* s1, const char* s2, int n) | |
{ | |
int c1, c2; | |
while (1) | |
{ | |
c1 = *s1++; |
View genit_benchmark.cpp
This file contains 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
#include <algorithm> | |
#include <iterator> | |
#include <vector> | |
// Generator Iterator test | |
namespace impl | |
{ | |
template<class Func> | |
class generator_iterator : public std::iterator< | |
std::random_access_iterator_tag, |
View gb_table_parser.cpp
This file contains 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
// silly hack job to parse http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html into a list with hex and binary representations of opcodes, in order to find patterns. | |
#include <algorithm> | |
#include <string> | |
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
int main(int argc, char** argv) | |
{ |
View c5g.vhd
This file contains 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
-- Baseline pineout | |
-- This is some base pinout file for the C5G, aka the terasic cyclone v gx starter kit board, because the one from terasic is verilog. | |
-- Some features are just not usable with this file. Don't assume it works or it is reliable. | |
library ieee; | |
use ieee.std_logic_1164.all; | |
entity baseline_c5gx is | |
-- 1.2V ADC | |
port ( |
View kag-translation-benchmark
This file contains 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
[10:40:44] Benchmark: Running 'naive translation (string concat)' (50000000 samples) | |
[10:43:07] Benchmark: Done in 143 seconds (~0.00286ms per sample) | |
[10:43:07] Benchmark: Running 'replace() translation' (50000000 samples) | |
[10:46:11] Benchmark: Done in 184 seconds (~0.00368ms per sample) |