小编Gab*_*abi的帖子

Julia导入不相关的包后性能下降

deepcopy一旦我导入一个不相关的包,我的性能就会受到影响CSV.我怎样才能解决这个问题?

import BenchmarkTools
mutable struct GameState
    gameScore::Vector{Int64}
    setScore::Vector{Int64}
    matchScore::Vector{Int64}
    serve::Int64
end
BenchmarkTools.@benchmark deepcopy(GameState([0,0],[0,0],[0,0],-1))

BenchmarkTools.Trial: 
  memory estimate:  1.02 KiB
  allocs estimate:  10
  --------------
  minimum time:     1.585 ?s (0.00% GC)
  median time:      1.678 ?s (0.00% GC)
  mean time:        2.519 ?s (27.10% GC)
  maximum time:     5.206 ms (99.88% GC)
  --------------
  samples:          10000
  evals/sample:     10

import CSV

BenchmarkTools.@benchmark deepcopy(GameState([0,0],[0,0],[0,0],-1))

BenchmarkTools.Trial: 
  memory estimate:  1.02 KiB
  allocs estimate:  10
  --------------
  minimum time:     6.709 ?s (0.00% GC)
  median time:      7.264 ?s (0.00% GC)
  mean …
Run Code Online (Sandbox Code Playgroud)

performance julia data-science

8
推荐指数
1
解决办法
191
查看次数

我在分区表中的符号列文件大小异常大——为什么会这样?

我刚刚使用展开和分区表构建了我的第一个正确的 q/kdb+ 数据库。一切都很顺利,但我刚刚注意到我的符号s列文件大小异常大。以下是我从操作系统和 q 内部可以看到的内容:

# ls -latr 2017.10.30/ngbarx
total 532
-rw-r--r-- 1 root root  24992 Apr 17 20:53 vunadj
-rw-r--r-- 1 root root  24992 Apr 17 20:53 v
-rw-r--r-- 1 root root 300664 Apr 17 20:53 s
...

q)meta ngbarx
c     | t f a
------| -----
date  | d    
s     | s   p
v     | e    
vunadj| e    
...

q)get `:2017.10.30/ngbarx/s
`p#`sym$`A`AA`AACG`AADI`AADR`AAIC`AAIC-B`AAL`AAM-A`AAMC`AAME`AAOI`AAON`AAP`AA..

q)-22!get `:2017.10.30/ngbarx/v
24990
q)-22!get `:2017.10.30/ngbarx/s
28678
q)all (get `:2017.10.30/ngbarx/s) in sym
1b
q)count sym …
Run Code Online (Sandbox Code Playgroud)

database-partitioning kdb

3
推荐指数
1
解决办法
319
查看次数