fumiama
|
ec053573f1
|
perf(tea): use runtime.fastrand
name old time/op new time/op delta
TEAen/16-8 242ns ± 1% 225ns ± 2% -6.98% (p=0.008 n=5+5)
TEAen/256-8 1.71µs ± 0% 1.68µs ± 0% -1.58% (p=0.008 n=5+5)
TEAen/4K-8 25.0µs ± 1% 25.0µs ± 0% ~ (p=1.000 n=5+5)
TEAen/32K-8 202µs ± 1% 202µs ± 0% ~ (p=0.548 n=5+5)
TEAde/16-8 208ns ± 0% 207ns ± 0% ~ (p=0.198 n=5+5)
TEAde/256-8 1.65µs ± 0% 1.64µs ± 0% -0.39% (p=0.048 n=5+5)
TEAde/4K-8 24.6µs ± 0% 24.6µs ± 1% ~ (p=1.000 n=5+5)
TEAde/32K-8 199µs ± 0% 199µs ± 0% ~ (p=0.905 n=4+5)
name old speed new speed delta
TEAen/16-8 66.2MB/s ± 1% 71.2MB/s ± 2% +7.51% (p=0.008 n=5+5)
TEAen/256-8 150MB/s ± 0% 152MB/s ± 0% +1.61% (p=0.008 n=5+5)
TEAen/4K-8 164MB/s ± 1% 164MB/s ± 0% ~ (p=1.000 n=5+5)
TEAen/32K-8 162MB/s ± 1% 162MB/s ± 0% ~ (p=0.548 n=5+5)
TEAde/16-8 154MB/s ± 0% 154MB/s ± 0% ~ (p=0.222 n=5+5)
TEAde/256-8 165MB/s ± 0% 165MB/s ± 0% ~ (p=0.056 n=5+5)
TEAde/4K-8 167MB/s ± 0% 167MB/s ± 1% ~ (p=1.000 n=5+5)
TEAde/32K-8 165MB/s ± 0% 165MB/s ± 0% ~ (p=0.825 n=4+5)
|
2021-11-23 13:18:58 +08:00 |
|
Blackjack200
|
70af1fee57
|
rename NewWriter to SelectWriter
|
2021-11-21 12:58:34 +08:00 |
|
wdvxdr
|
97dcddb6d4
|
jce: speed up read
don't use bytes.Buffer to inline more functions
name old time/op new time/op delta
JceReader_ReadSlice-8 614µs ±68% 523µs ±70% ~ (p=0.690 n=5+5)
RequestDataVersion2_ReadFrom-8 3.98µs ± 1% 3.54µs ± 2% -10.96% (p=0.008 n=5+5)
name old speed new speed delta
JceReader_ReadSlice-8 104MB/s ± 7% 121MB/s ± 2% +16.68% (p=0.008 n=5+5)
RequestDataVersion2_ReadFrom-8 23.4MB/s ± 1% 26.3MB/s ± 2% +12.33% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
JceReader_ReadSlice-8 196kB ±67% 184kB ±67% ~ (p=0.690 n=5+5)
RequestDataVersion2_ReadFrom-8 2.59kB ± 0% 2.62kB ± 0% +1.04% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
JceReader_ReadSlice-8 9.02k ±67% 9.02k ±67% ~ (p=1.000 n=5+5)
RequestDataVersion2_ReadFrom-8 46.0 ± 0% 44.0 ± 0% -4.35% (p=0.008 n=5+5)
|
2021-11-20 20:54:19 +08:00 |
|
wdvxdr
|
43b23f4e6f
|
jce: speed up write
name old time/op new time/op delta
JceWriter_WriteMap-8 2.46µs ± 1% 2.37µs ± 1% -3.88% (p=0.000 n=9+9)
JceWriter_WriteJceStructRaw-8 1.78µs ± 1% 1.29µs ± 1% -27.38% (p=0.000 n=9+10)
name old speed new speed delta
JceWriter_WriteMap-8 37.7MB/s ± 1% 39.3MB/s ± 1% +4.04% (p=0.000 n=9+9)
JceWriter_WriteJceStructRaw-8 59.0MB/s ± 1% 81.3MB/s ± 1% +37.70% (p=0.000 n=9+10)
name old alloc/op new alloc/op delta
JceWriter_WriteMap-8 1.30kB ± 0% 1.30kB ± 0% ~ (all equal)
JceWriter_WriteJceStructRaw-8 724B ± 0% 640B ± 0% -11.60% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
JceWriter_WriteMap-8 30.0 ± 0% 30.0 ± 0% ~ (all equal)
JceWriter_WriteJceStructRaw-8 29.0 ± 0% 15.0 ± 0% -48.28% (p=0.000 n=10+10)
|
2021-11-20 11:38:24 +08:00 |
|
wdvxdr
|
574c4e57b1
|
perf(tea): unrolling encode
name old time/op new time/op delta
TEAen/16-8 237ns ± 0% 227ns ± 1% -4.03% (p=0.008 n=5+5)
TEAen/256-8 1.69µs ± 0% 1.60µs ± 1% -4.83% (p=0.008 n=5+5)
TEAen/4K-8 25.0µs ± 1% 23.8µs ± 2% -4.73% (p=0.008 n=5+5)
TEAen/32K-8 199µs ± 1% 188µs ± 1% -5.30% (p=0.008 n=5+5)
TEAde/16-8 196ns ± 1% 194ns ± 1% -0.89% (p=0.016 n=5+5)
TEAde/256-8 1.56µs ± 0% 1.54µs ± 0% -1.50% (p=0.008 n=5+5)
TEAde/4K-8 23.5µs ± 0% 23.2µs ± 0% -1.46% (p=0.008 n=5+5)
TEAde/32K-8 187µs ± 1% 184µs ± 1% -1.50% (p=0.008 n=5+5)
name old speed new speed delta
TEAen/16-8 67.6MB/s ± 1% 70.5MB/s ± 1% +4.20% (p=0.008 n=5+5)
TEAen/256-8 152MB/s ± 0% 160MB/s ± 1% +5.07% (p=0.008 n=5+5)
TEAen/4K-8 164MB/s ± 1% 172MB/s ± 2% +4.98% (p=0.008 n=5+5)
TEAen/32K-8 165MB/s ± 1% 174MB/s ± 1% +5.60% (p=0.008 n=5+5)
TEAde/16-8 163MB/s ± 1% 165MB/s ± 1% +0.90% (p=0.016 n=5+5)
TEAde/256-8 174MB/s ± 0% 177MB/s ± 0% +1.51% (p=0.008 n=5+5)
TEAde/4K-8 175MB/s ± 0% 177MB/s ± 0% +1.48% (p=0.008 n=5+5)
TEAde/32K-8 175MB/s ± 1% 178MB/s ± 1% +1.52% (p=0.008 n=5+5)
|
2021-11-17 13:33:25 +08:00 |
|
wdvxdr
|
a69487056d
|
drop unsafe in TEA encryption
name old time/op new time/op delta
TEAen/16-8 245ns ± 0% 237ns ± 0% -3.29% (p=0.008 n=5+5)
TEAen/256-8 1.73µs ± 0% 1.69µs ± 0% -2.77% (p=0.008 n=5+5)
TEAen/4K-8 24.9µs ± 0% 25.0µs ± 1% ~ (p=0.690 n=5+5)
TEAen/32K-8 198µs ± 0% 199µs ± 1% +0.73% (p=0.008 n=5+5)
TEAde/16-8 215ns ± 1% 196ns ± 1% -8.93% (p=0.008 n=5+5)
TEAde/256-8 1.70µs ± 0% 1.56µs ± 0% -8.08% (p=0.008 n=5+5)
TEAde/4K-8 24.9µs ± 1% 23.5µs ± 0% -5.50% (p=0.008 n=5+5)
TEAde/32K-8 198µs ± 0% 187µs ± 1% -5.34% (p=0.008 n=5+5)
name old speed new speed delta
TEAen/16-8 65.4MB/s ± 0% 67.6MB/s ± 1% +3.39% (p=0.008 n=5+5)
TEAen/256-8 148MB/s ± 0% 152MB/s ± 0% +2.84% (p=0.008 n=5+5)
TEAen/4K-8 164MB/s ± 0% 164MB/s ± 1% ~ (p=0.587 n=5+5)
TEAen/32K-8 166MB/s ± 0% 165MB/s ± 1% -0.72% (p=0.008 n=5+5)
TEAde/16-8 149MB/s ± 1% 163MB/s ± 1% +9.81% (p=0.008 n=5+5)
TEAde/256-8 160MB/s ± 0% 174MB/s ± 0% +8.80% (p=0.008 n=5+5)
TEAde/4K-8 165MB/s ± 1% 175MB/s ± 0% +5.81% (p=0.008 n=5+5)
TEAde/32K-8 166MB/s ± 0% 175MB/s ± 1% +5.70% (p=0.008 n=5+5)
|
2021-11-16 20:54:40 +08:00 |
|
wdvxdr
|
2a92b2755f
|
perf: speed up tea encrypt & decrypt
name old time/op new time/op delta
TEAen/16-8 260ns ± 0% 245ns ± 0% -5.83% (p=0.008 n=5+5)
TEAen/256-8 1.86µs ± 0% 1.73µs ± 0% -6.86% (p=0.008 n=5+5)
TEAen/4K-8 27.8µs ± 0% 24.9µs ± 0% -10.19% (p=0.008 n=5+5)
TEAde/16-8 223ns ± 1% 215ns ± 1% -3.24% (p=0.008 n=5+5)
TEAde/256-8 1.88µs ± 0% 1.70µs ± 0% -9.49% (p=0.000 n=4+5)
TEAde/4K-8 28.1µs ± 1% 24.9µs ± 1% -11.43% (p=0.008 n=5+5)
name old speed new speed delta
TEAen/16-8 61.6MB/s ± 0% 65.4MB/s ± 0% +6.19% (p=0.008 n=5+5)
TEAen/256-8 138MB/s ± 0% 148MB/s ± 0% +7.35% (p=0.008 n=5+5)
TEAen/4K-8 147MB/s ± 0% 164MB/s ± 0% +11.34% (p=0.008 n=5+5)
TEAde/16-8 144MB/s ± 1% 149MB/s ± 1% +3.34% (p=0.008 n=5+5)
TEAde/256-8 145MB/s ± 0% 160MB/s ± 0% +10.47% (p=0.016 n=4+5)
TEAde/4K-8 146MB/s ± 1% 165MB/s ± 1% +12.90% (p=0.008 n=5+5)
|
2021-11-12 11:40:40 +08:00 |
|
Mrs4s
|
af9ed48cb7
|
feat: query guild service image
|
2021-11-09 03:16:26 +08:00 |
|
wdvxdr
|
aba75d5733
|
fix: fix wrong byte array length in (*encoder).u32
|
2021-11-07 13:58:46 +08:00 |
|
wdvxdr
|
21ff14fd5c
|
optimize(binary): allow inline (*encoder).svarint
name old time/op new time/op delta
encoder_svarint/short-8 7.12ns ± 2% 6.24ns ± 2% -12.36% (p=0.000 n=10+9)
encoder_svarint/medium-8 8.86ns ± 3% 7.82ns ± 2% -11.76% (p=0.000 n=10+10)
encoder_svarint/large-8 12.2ns ± 1% 11.4ns ± 2% -5.99% (p=0.000 n=10+10)
BTW, (*encoder).u32 and (*encoder).u64 can be inlined with go1.18
|
2021-11-07 13:56:40 +08:00 |
|
wdvxdr
|
4a777539be
|
test: add benchmark for (*encoder).uvarint
|
2021-11-07 13:28:17 +08:00 |
|
Mrs4s
|
991f69f141
|
feat: ChannelService.FetchGuestGuild
|
2021-11-06 23:37:33 +08:00 |
|
Mrs4s
|
4dfdc22a70
|
style: cleanup dynamic proto encode
|
2021-11-06 15:27:56 +08:00 |
|
wdvxdr
|
7e2033fd75
|
test: unify tea benchmark
|
2021-11-06 14:41:47 +08:00 |
|
Mrs4s
|
606ad69679
|
feat: GetGuildMembers
|
2021-11-06 14:12:03 +08:00 |
|
wdvxdr
|
80e2d83dab
|
fix: only read protobuf on known sub-type
Fixes Mrs4s/go-cqhttp#1120
|
2021-10-21 18:01:33 +08:00 |
|
wdvxdr
|
3b85d69fd3
|
dep: use github.com/klauspost/compress
|
2021-10-16 22:11:21 +08:00 |
|
wdvxdr
|
2cdb7407f9
|
clean: remove unused method
|
2021-10-05 23:33:39 +08:00 |
|
wdvxdr
|
fd9a6657fa
|
drop dep jsoniter&reflect2.
for smaller binary size.
|
2021-08-25 16:16:08 +08:00 |
|
wdvxdr
|
7bed7a3657
|
jce: optimize JceWriter_WriteMap.
name old time/op new time/op delta
JceWriter_WriteMap-8 4.09µs ± 3% 2.44µs ± 1% -40.39% (p=0.000 n=10+8)
name old speed new speed delta
JceWriter_WriteMap-8 22.8MB/s ± 3% 38.2MB/s ± 1% +67.73% (p=0.000 n=10+8)
name old alloc/op new alloc/op delta
JceWriter_WriteMap-8 2.34kB ± 0% 1.30kB ± 0% -44.37% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
JceWriter_WriteMap-8 52.0 ± 0% 30.0 ± 0% -42.31% (p=0.000 n=10+10)
|
2021-08-17 17:06:00 +08:00 |
|
wdvxdr
|
53ac47950c
|
jce: optimize readByte.
name old time/op new time/op delta
JceReader_ReadSlice-8 271µs ± 2% 228µs ± 7% -15.97% (p=0.000 n=9+10)
RequestDataVersion2_ReadFrom-8 4.57µs ± 6% 4.08µs ± 2% -10.74% (p=0.000 n=10+10)
name old speed new speed delta
JceReader_ReadSlice-8 77.6MB/s ± 2% 92.5MB/s ± 7% +19.14% (p=0.000 n=9+10)
RequestDataVersion2_ReadFrom-8 20.4MB/s ± 6% 22.8MB/s ± 2% +11.92% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
JceReader_ReadSlice-8 73.4kB ± 0% 65.3kB ± 0% -10.96% (p=0.000 n=9+6)
RequestDataVersion2_ReadFrom-8 2.64kB ± 0% 2.59kB ± 0% -1.93% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
JceReader_ReadSlice-8 6.02k ± 0% 3.01k ± 0% -49.96% (p=0.000 n=10+10)
RequestDataVersion2_ReadFrom-8 67.0 ± 0% 46.0 ± 0% -31.34% (p=0.000 n=10+10)
|
2021-08-17 16:32:16 +08:00 |
|
wdvxdr
|
0ca0c6ea45
|
jce: readHead return non-ptr.
avoid escape.
name old time/op new time/op delta
JceReader_ReadSlice-8 469µs ± 1% 238µs ± 2% -49.40% (p=0.000 n=8+9)
RequestDataVersion2_ReadFrom-8 5.72µs ± 5% 4.12µs ± 4% -28.04% (p=0.000 n=9+10)
name old speed new speed delta
JceReader_ReadSlice-8 44.8MB/s ± 1% 88.6MB/s ± 2% +97.66% (p=0.000 n=8+9)
RequestDataVersion2_ReadFrom-8 16.3MB/s ± 6% 22.6MB/s ± 4% +38.89% (p=0.000 n=9+10)
name old alloc/op new alloc/op delta
JceReader_ReadSlice-8 266kB ± 0% 73kB ± 0% -72.40% (p=0.000 n=8+7)
RequestDataVersion2_ReadFrom-8 3.74kB ± 0% 2.64kB ± 0% -29.49% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
JceReader_ReadSlice-8 18.0k ± 0% 6.0k ± 0% -66.66% (p=0.000 n=10+10)
RequestDataVersion2_ReadFrom-8 136 ± 0% 67 ± 0% -50.74% (p=0.000 n=10+10)
|
2021-08-17 12:01:45 +08:00 |
|
wdvxdr
|
ad174508ff
|
clean(jce): use new ReadBytes rather than ReadAny.
use rsc.io/rf tool:
rf '
ex {
var reader *JceReader
var tag int
reader.ReadAny(tag).([]byte) -> reader.ReadBytes(tag)
}
'
|
2021-08-13 15:35:26 +08:00 |
|
wdvxdr
|
1abbeb148a
|
feat(jce): new api *JceReader.ReadBytes.
|
2021-08-13 15:29:07 +08:00 |
|
wdvxdr
|
3ed9b8d698
|
clean(jce): remove ReadMapF.
|
2021-08-12 23:28:21 +08:00 |
|
wdvxdr
|
9814f5295d
|
refactor(jce): use ReadMap & remove ReadMapF.
name old time/op new time/op delta
RequestDataVersion2_ReadFrom-8 5.58µs ± 1% 5.78µs ± 2% +3.64% (p=0.000 n=9+9)
name old speed new speed delta
RequestDataVersion2_ReadFrom-8 16.7MB/s ± 1% 16.1MB/s ± 2% -3.52% (p=0.000 n=9+9)
name old alloc/op new alloc/op delta
RequestDataVersion2_ReadFrom-8 5.40kB ± 0% 3.74kB ± 0% -30.67% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
RequestDataVersion2_ReadFrom-8 147 ± 0% 136 ± 0% -7.48% (p=0.000 n=10+10)
|
2021-08-12 23:24:58 +08:00 |
|
wdvxdr
|
f4fca58809
|
feat(jce): optimize ReadSlice performance.
name old time/op new time/op delta
JceReader_ReadSlice-8 1.09ms ± 7% 0.52ms ± 1% -52.48% (p=0.000 n=10+10)
name old speed new speed delta
JceReader_ReadSlice-8 19.4MB/s ± 7% 40.8MB/s ± 1% +110.25% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
JceReader_ReadSlice-8 594kB ± 1% 266kB ± 0% -55.22% (p=0.000 n=9+9)
name old allocs/op new allocs/op delta
JceReader_ReadSlice-8 22.6k ± 0% 18.0k ± 0% -19.98% (p=0.000 n=10+10)
|
2021-08-12 20:45:45 +08:00 |
|
wdvxdr
|
1d900b302d
|
feat: group member shut up timestamp.
Fixes: #174
|
2021-08-07 16:43:13 +08:00 |
|
wdvxdr
|
b7dee2aeb2
|
use binary package in reader.
|
2021-07-13 10:17:36 +08:00 |
|
wdvxdr
|
4aa87a8ab8
|
dep: remove github.com/golang/protobuf
|
2021-06-11 14:23:46 +08:00 |
|
wdvxdr
|
d4f4def17d
|
Revert "feat: upload with sendfile"
This reverts commit cdb83e54
|
2021-06-11 13:27:35 +08:00 |
|
wdvxdr
|
cdb83e5426
|
feat: upload with sendfile
|
2021-05-03 14:30:08 +08:00 |
|
Mrs4s
|
b66d8a9a95
|
feat: delete friend.
|
2021-04-29 09:51:15 +08:00 |
|
Mrs4s
|
6efd6e020d
|
fix c2c msg processor.
|
2021-04-26 20:59:02 +08:00 |
|
wdvxdr
|
f2de387430
|
export gzip writer & inline UniPacket
|
2021-04-16 16:15:14 +08:00 |
|
wdvxdr
|
5b46d1651f
|
reuse 128k []byte
|
2021-04-15 22:32:43 +08:00 |
|
wdvxdr
|
2e64a6913d
|
zap: reuse some []byte
优化单线程上传内存使用
|
2021-04-15 21:36:14 +08:00 |
|
wdvxdr
|
192b8c562f
|
feat: gzip with sync pool
挺有用的
|
2021-04-13 18:39:59 +08:00 |
|
Mrs4s
|
dd7898c204
|
feat: SetOnlineStatus.
|
2021-04-06 09:52:22 +08:00 |
|
Mrs4s
|
0a81b76d23
|
use uploaded image to ocr request.
|
2021-04-04 16:18:45 +08:00 |
|
wdvxdr
|
d233c90d50
|
change writer without buffer
使用了sync.Pool,从池中取出来的自带一定容量,所以无需使用Buffer
|
2021-03-23 22:37:36 +08:00 |
|
wdvxdr
|
207df5fc00
|
NewWriterF with sync.Pool
多次写入,需要扩容时速度提升
|
2021-03-23 22:10:12 +08:00 |
|
Mrs4s
|
8e191523f6
|
feat: qrcode login.
|
2021-03-20 21:21:40 +08:00 |
|
wdvxdr
|
93534fe94a
|
improve binary.Writer
|
2021-03-12 16:07:36 +08:00 |
|
github-actions
|
65d9145353
|
ci(chore): Fix stylings
|
2021-03-06 12:03:26 +00:00 |
|
Lin
|
8c0c269c72
|
加快图片UUID生成 减少内存占用
|
2021-03-06 19:55:05 +08:00 |
|
github-actions
|
65ab1304e6
|
ci(chore): Fix stylings
|
2021-02-14 03:06:03 +00:00 |
|
wdvxdr
|
449fd49fd3
|
⚡speed up jce writer again
BenchmarkJceWriter_WriteJceStructRaw
BenchmarkJceWriter_WriteJceStructRaw-8 414883 2659 ns/op
BenchmarkJceWriter_WriteJceStructRaw2
BenchmarkJceWriter_WriteJceStructRaw2-8 925503 1460 ns/op
又快了1倍
|
2021-02-02 13:21:28 +08:00 |
|
wdvxdr
|
a782ccbf10
|
fix
|
2021-01-30 18:47:43 +08:00 |
|
wdvxdr
|
59e689bd46
|
speed up jce
pkg: github.com/Mrs4s/MiraiGo/binary/jce
BenchmarkJceWriter_WriteJceStructRaw
BenchmarkJceWriter_WriteJceStructRaw-8 200443 5966 ns/op
BenchmarkJceWriter_WriteJceStructRaw2
BenchmarkJceWriter_WriteJceStructRaw2-8 481285 2659 ns/op
|
2021-01-30 18:43:12 +08:00 |
|