我正在使用Debian 7(wheezy)amd64.
uname -a
Linux tzwm-debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
我想ia32-libs在我的Debian中安装.但是当我尝试安装时会发生这种情况.
sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The …Run Code Online (Sandbox Code Playgroud) 我发现当我新建一个Hash时,有七个对象比六个长度哈希慢得多.我知道哈希的长度会影响性能.但我不知道为什么七是一个特殊的.
这是benchmark(Ruby 2.2.3)的代码:
require 'benchmark/ips'
Benchmark.ips do |x|
x.report(5) { { a: 0, b: 1, c: 2, d: 3, e: 4 } }
x.report(6) { { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5 } }
x.report(7) { { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5, g: 6 } }
x.report(8) { { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5, g: 6, h: 7 …Run Code Online (Sandbox Code Playgroud)