Skip to content

Instantly share code, notes, and snippets.

@Oipo
Oipo / output.txt
Created April 7, 2017 12:54
Simple benchmark comparing cereal json vs rapidjson included in cereal.
99999
199999
299999
399999
499999
599999
699999
799999
899999
999999
@Oipo
Oipo / GLD.SerializerBenchmark.txt
Last active January 25, 2018 15:39
GLD.SerializerBenchmark output
Tests performed 100 times for each TestData + Serializer pair
################################################################################
Test Data: Person
Serializer: Ops/sec Avg: Ser Deser Ser+Deser Size: Avg
===============================================================================
MessageShark Stream 354.808 373.007 181.495 642
NetSerializer Stream 344.589 352.864 173.695 647
ProtoBuf Stream 316.466 227.366 131.948 687
NetSerializer string 300.554 219.123 126.668 864
vertexData = {
x, y, 0.0f, 0.0f,
x+w, y, 1.0f, 0.0f,
x, y+h, 0.0f, 1.0f,
x+y, y+h, 1.0f, 1.0f
};
LOG(INFO) << "[sprite] " << x << " " << y << " " << w << " " << h << endl;
// example: [sprite] 288 288 32 32
src/main.rs:1:1: 1:1 error: type name `Citext` is undefined or not in scope [E0412]
src/main.rs:1 #![feature(custom_derive, custom_attribute, plugin)]
^
<diesel macros>:5:1: 5:71 note: in this expansion of table_body! (defined in <diesel macros>)
src/database/schema.rs:1:1: 1:40 note: in this expansion of table! (defined in <diesel macros>)
src/database/schema.rs:1:1: 1:40 note: in this expansion of infer_schema! (defined in src/main.rs)
src/main.rs:1:1: 1:1 help: run `rustc --explain E0412` to see a detailed explanation
src/main.rs:1:1: 1:1 help: no candidates by the name of `Citext` found in your project; maybe you misspelled the name or forgot to import an external crate?
src/main.rs:1:1: 1:1 error: type name `Citext` is undefined or not in scope [E0412]
src/main.rs:1 #![feature(custom_derive, custom_attribute, plugin)]
import { Component } from '@angular/core';
@Component({
selector: 'login-form',
templateUrl: 'app/login-form.html'
})
export class LoginFormComponent {
submitted = false;
error = '';
model = {
@Oipo
Oipo / test.js
Last active June 10, 2016 21:36
const dropAllTables = async () => {
const tables = requireDir('./database/tables');
const sortedTables = _.sortBy(tables, table => -table[0].order);
_.forEach(sortedTables, async table => {
await bookshelf.knex.schema.dropTableIfExists(table[0].name);
console.log(`dropping ${table[0].name}`);
});
};
dropAllTables();
console.log('done dropping');
@Oipo
Oipo / js
Created April 10, 2016 17:37
'use strict';
const prompt = require('prompt');
prompt.start();
let accepted = false;
while(!accepted) {
prompt.get([{
name: 'host',