Skip to content

Instantly share code, notes, and snippets.

Guillaume Chatelet gchatelet

Block or report user

Report or block gchatelet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Intel(R) Atom(TM) CPU 230 @ 1.60GHz
################ Unified Information ################
Vendor: GenuineIntel
Brand: Intel(R) Atom(TM) CPU 230 @ 1.60GHz
Cores per CPU: 1
Threads per CPU: 2
------------------ TLB Information ------------------
Instruction TLB:
- - - - - ITLB1: - - - - - - - - - - - - - - - - - -
Page size = 4 KB
Pages count = 32
View cpuid - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
################ Unified Information ################
Cores per CPU = 4
Threads per CPU = 8
------------------ TLB Information ------------------
Instruction TLB:
- - - - - ITLB1: - - - - - - - - - - - - - - - - - -
Page size = 4 KB
Pages count = 64
Pages count = 64
Associativity: 8-way associative
View smallvector.d
struct SmallVector(T, size_t SIZE)
{
private T[SIZE] small_buffer;
private T* begin_ptr;
private size_t size;
private size_t capacity = SIZE;
invariant
{
assert(capacity >= size);
@gchatelet
gchatelet / gist:a8a2c953c598a1eeaf84c9109064e828
Last active May 7, 2016
dmd / gdc / ldc assembler for putBlocks function for murmurhash3 x86_64
View gist:a8a2c953c598a1eeaf84c9109064e828
Code is here:
https://github.com/gchatelet/phobos/blob/murmurhash3/std/digest/murmurhash.d#L97
###############
## dmd putBlock
###############
000000000049e158 <_D3std6digest10murmurhash65__T9putBlocksTS3std6digest10murmurhash20SMurmurHash3_x64_128TG2mZ9putBlocksFNaNbNiNfKS3std6digest10murmurhash20SMurmurHash3_x64_128MxAG2mX9__lambda3FNaNbNiNeKS3std6digest10murmurhash20SMurmurHash3_x64_128MxAG2mXv>:
49e158: 48 83 ec 28 sub $0x28,%rsp
49e15c: 4c 89 24 24 mov %r12,(%rsp)
49e160: 4c 89 6c 24 08 mov %r13,0x8(%rsp)
View cpp_mangling_test_linux_64.d
// DO NOT EDIT MANUALLY
// This code is autogenerated.
// Have a look at test/cpp_mangling_tools/README.md for more informations.
import core.stdc.config;
version(linux):
static if(ptrdiff_t.sizeof == 8): // Only for 64 bits systems
struct S {}
View D linux name mangling
version(linux):
extern(C++) {
struct elem9 { }
void foobar9(elem9*, elem9*);
static assert(foobar9.mangleof == "_Z7foobar9P5elem9S0_");
}
extern (C++)
{
View C++ Linux Name Mangling
// g++ ~/template_test.cc -c && nm template_test.o
struct A {};
struct B {};
template<typename TC>
struct C {
TC foo(TC) {}
};
View concurrency.cpp
#include <algorithm>
#include <chrono>
#include <future>
#include <thread>
#include <vector>
using namespace std;
using namespace std::chrono;
struct StopWatch {
View SimpleServer.java
import org.restlet.Application;
import org.restlet.Server;
import org.restlet.data.Protocol;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
public class SimpleServer extends Application {
public static void main(String[] args) throws Exception {
new Server(Protocol.HTTP, 8111, GreetingResource.class).start();
}
View Pool.hpp
/*
* Pool.h
*
* Created on: Feb 12, 2013
* Author: Guillaume Chatelet
*/
#ifndef POOL_H_
#define POOL_H_
You can’t perform that action at this time.