Skip to content

Instantly share code, notes, and snippets.

View vegard's full-sized avatar

Vegard Nossum vegard

View GitHub Profile
@vegard
vegard / instance.cnf
Created March 21, 2013 14:03
SHA-1 SAT instance
This file has been truncated, but you can view the full file.
p cnf 3968 120401
c
c Instance generated by sha1-sat
c Written by Vegard Nossum <vegard.nossum@gmail.com>
c <https://github.com/vegard/sha1-sat>
c
c command line: ./main --seed 17690 --attack preimage --rounds 21 --hash-bits 73 --cnf
c parameter seed = 17690
c sha1
c parameter nr_rounds = 21
@vegard
vegard / gist:3164563
Created July 23, 2012 16:26
SQL in C++11
#include <array>
#include <iostream>
#include <string>
#include <sstream>
#include <tuple>
#include <utility>
#include <vector>
template<typename T>
class table {
============================[ Problem Statistics ]=============================
| |
| Number of variables: 13408 |
| Number of clauses: 8320 |
| Parse time: 0.02 s |
| Simplification time: 0.00 s |
| |
============================[ Search Statistics ]==============================
| Conflicts | ORIGINAL | LEARNT | Progress |
| | Vars Clauses Literals | Limit Clauses Lit/Cl | |
debug-0.txt is the output of -Xtrace:invoke for DEBUG=0 while debug-1.txt is the same for DEBUG=1
--- debug-0.txt 2012-04-27 14:11:32.000000000 +0200
+++ debug-1.txt 2012-04-27 14:12:19.000000000 +0200
@@ -44,0 +45,11 @@
+[main] trace invoke: java/lang/StringBuilder.<init>()V
+[main] trace invoke: java/lang/StringBuilder.<init>(I)V
+[main] trace invoke: java/lang/Object.<init>()V
+[main] trace invoke: java/lang/StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder;
+[main] trace invoke: java/lang/StringBuilder.ensureCapacity(I)V