View hashtbl.cr
class HashChTbl(K, V)
include Enumerable({K, V})
include Iterable({K, V})
getter size : Int32 = 0
# index into SIZES array
@sz : UInt8 = 0_u8
@rebuild_num : UInt16 = 0_u16
@first : UInt32 = 0_u32
@last : UInt32 = 0_u32
View .gitconfig
[gui]
spellingdictionary = en_US
tabsize = 4
fontui = -family \"DejaVu Sans\" -size 10 -weight normal -slant roman -underline 0 -overstrike 0
fontdiff = -family \"DejaVu Sans Mono\" -size 10 -weight normal -slant roman -underline 0 -overstrike 0
[user]
emal = funny.falcon@gmail.com
email = funny.falcon@gmail.com
name = Sokolov Yura
[http]
View prim.txt
26-5-1 11 x^64 + x^36 + x^32 + x^30 + x^28 + x^26 + x^24 + x^15 + x^13 + x^4 + 1
2-7-21 11 x^64 + x^35 + x^34 + x^32 + x^19 + x^18 + x^8 + x^4 + x^3 + x^2 + 1
5-27-18 11 x^64 + x^32 + x^26 + x^20 + x^18 + x^12 + x^9 + x^6 + x^5 + x^4 + 1
1-2-11 13 x^64 + x^41 + x^35 + x^33 + x^32 + x^18 + x^11 + x^9 + x^6 + x^3 + x^2 + x + 1
20-7-3 13 x^64 + x^52 + x^44 + x^40 + x^32 + x^24 + x^21 + x^16 + x^14 + x^12 + x^8 + x^4 + 1
23-8-1 15 x^64 + x^47 + x^41 + x^36 + x^32 + x^27 + x^26 + x^23 + x^22 + x^13 + x^11 + x^10 + x^6 + x^4 + 1
5-27-21 15 x^64 + x^33 + x^32 + x^29 + x^27 + x^23 + x^21 + x^15 + x^13 + x^10 + x^7 + x^6 + x^5 + x^3 + 1
10-13-6 17 x^64 + x^42 + x^39 + x^38 + x^37 + x^34 + x^31 + x^29 + x^28 + x^26 + x^24 + x^23 + x^21 + x^16 + x^14 + x^12 + 1
17-1-18 17 x^64 + x^37 + x^35 + x^32 + x^31 + x^27 + x^23 + x^21 + x^19 + x^16 + x^15 + x^13 + x^9 + x^7 + x^3 + x + 1
18-7-16 17 x^64 + x^47 + x^46 + x^41 + x^40 + x^34 + x^31 + x^25 + x^22 + x^20 + x^15 + x^14 + x^12 + x^10 + x^9 + x^8 + 1
View hasher.cr
require "secure_random"
require "static_array"
module Hashing
alias Type = UInt32
@@seed = uninitialized StaticArray(UInt32, 6)
struct StdHasher
# lucky777 hash https://github.com/funny-falcon/fanom_hash/blob/master/lucky777.h
struct Impl
View 00-report.md

Report for improved id_table implementation

  • it has up to 25% less size (19% on smallest tables)

  • it is a bit slower on small tables (~3%) for hit and a bit faster for miss

  • due to additional mix of key bits, it is always faster on big tables.

    Note: bit mixing makes small tables slower, so it is enabled only for big tables (>64 capacity).

    If performance for small tables much more important, mixing could be removed completely (this will return 1% on hit)

View go-rpc-client.go
package main
import (
"flag"
"fmt"
"log"
"net/rpc"
"sync"
"time"
)
View simple-client.go
package main
import (
"bufio"
"encoding/binary"
"flag"
"fmt"
"io"
"log"
"net"
View rand_test.go
package benchmarks
/*
BenchmarkRandInt63_Global-4 10000000 154 ns/op
BenchmarkRandInt63_Channel-4 10000000 220 ns/op
BenchmarkRandInt63_Pool-4 50000000 28.8 ns/op
BenchmarkSourceInt63_Pool-4 50000000 34.9 ns/op
BenchmarkRandInt63_Source-4 300000000 5.71 ns/op
BenchmarkRandInt63_ShardsGettid-4 50000000 29.2 ns/op
BenchmarkRandInt63_ShardsMid-4 100000000 14.2 ns/op
View ciph48.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <assert.h>
#include <sys/stat.h>
#include <unistd.h>
#include <inttypes.h>
#include <string.h>
// Minimum recommended values are DOUBLEROUND=3 and MIX=2.
View 00_unpacthed
# unpatched
$ for i in {1..6} ; do time src/luajit test_str.lua $i ; done
1 1000000 8191
real 0m0.197s
user 0m0.196s
sys 0m0.000s
2 500000 8191
real 0m0.169s