Skip to content

Instantly share code, notes, and snippets.


Mitsunori Komatsu komamitsu

View GitHub Profile
komamitsu / gist:0d67813f20904bd05dc93cf036cd5ab5
Last active Mar 25, 2018
Performance and memory footprint comparison for set collections
View gist:0d67813f20904bd05dc93cf036cd5ab5
package org.komamitsu.test;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
import it.unimi.dsi.fastutil.objects.ObjectSets;
import org.eclipse.collections.api.factory.set.MutableSetFactory;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.trie4j.doublearray.DoubleArray;
import org.trie4j.patricia.PatriciaTrie;
komamitsu /
Last active Oct 15, 2017
Lambda comparison between Java and Kotlin
public class JavaLambdaTest
public int i;
public void runTask(Runnable f)
public void run()
package org.komamitsu.test;
import org.codehaus.commons.compiler.CompilerFactoryFactory;
import org.codehaus.commons.compiler.IClassBodyEvaluator;
import java.lang.reflect.Method;
public class JaninoExample
public int add(int a, int b)
View MovableScript.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeScript : MonoBehaviour {
void Update() {
transform.Rotate(0, Input.GetAxis("Horizontal") * 60 * Time.deltaTime, 0);
transform.Translate(Vector3.forward * Input.GetAxis("Vertical") * 0.2f, Space.Self);
View Aurora_


  • VCL

    • Volume Complete LSN
    • Guarantee availability of all prior log records
    • During storage recovery, every log record with an LSN larger than the VCL must be truncated
  • VDL

    • Volume Durable LSN
    • Consistency Point LSNs
View msgpack_bench:2_7_1__111
[info] Test org.msgpack.jackson.dataformat.benchmark.MessagePackDataformatHugeDataBenchmarkTest.testBenchmark started
serialize(huge) with JSON:
mean : 28.948
min : 28.728
max : 29.139
stdev: 0.180
serialize(huge) with MessagePack:
mean : 31.686
View td-client-rust_ts_decode_error.log
thread 'main' panicked at 'called `Result::unwrap()` on
an `Err` value: JsonDecodeError(ApplicationError("Could not parse \'2017-04-24T14:33:43Z\' as a TimeStamp."))',src/libcore/
public static void main(String[] args)
throws IOException
DoubleArrayTrie da = new DoubleArrayTrie();
List<String> lines = new ArrayList<>();
try (BufferedReader reader = new BufferedReader(new FileReader("/Users/komamitsu/tmp/sorted_uuids"))) {
String line;
while ((line = reader.readLine()) != null) {
View dartest.cpp
// cc -c dartest.cpp && c++ -o dartest dartest.o
#include <chrono>
#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
#include <darts.h>
using namespace std;
View maze_in_minecraft.rb
require 'minecraft-pi-ruby'
N = 41
xs = []
(N + 2).times do |y|
xs[y] = ' ' * (N + 2)