This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |
This file contains hidden or 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
/* | |
* | |
* Golang badger db using GOB to serialize object data into badger fields | |
* | |
* Golang has its very own serializer / deserializer - Go Object (gob) so why not use it where data passed is entirely within a Go | |
* application ? | |
* | |
* JSON or some other text based solution could be used but gob might be faster. | |
* | |
* A gob encoder accepts the type bytes.Buffer to encode data to, so to write this to Badger, which accepts the type byte |
OlderNewer