Skip to content

Instantly share code, notes, and snippets.

View frsyuki's full-sized avatar

Sadayuki Furuhashi frsyuki

View GitHub Profile
@frsyuki
frsyuki / DeserBenchmark.java
Last active August 29, 2015 14:00
unsafe-test-2
import java.util.Random;
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
public interface XyzInput {
public Buffer getNextBuffer() throws IOException;
}
// non-reference counter
public abstract class Buffer {
private Unsafe unsafe;
private long pointer;
private Object base;
import java.util.Random;
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Random;
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import os
import httplib
import time
try: import simplejson as json
except ImportError: import json
VERSION = "0.1.0"
class ClientSession(object):
@frsyuki
frsyuki / presto-client.py
Last active October 11, 2020 09:56
Presto client for Ruby and Python
import os
import json
import httplib
import time
VERSION = "0.1.0"
class ClientSession:
def __init__(self, server, user, source=None, catalog=None, schema=None, debug=False):
self.server = server

blog

org.msgpack.core

  • enum ValueType
  • interface Packer
  • interface Unpacker
  • class MessagePacker implements Packer
  • class MessageUnpacker implements Unpacker
  • interface MessagePackerChannel
    • short readShort()
    • int readInt()
  • interface MessageUnpackerChannel