我开发了一个代码,可以输入一个大的2-D图像(最高64MPixels)和:
虽然它没有改变某些东西,但为了完整性我的问题,过滤是应用离散小波变换,代码是用C语言编写的.
我的最终目标是尽可能快地运行.到目前为止,通过使用阻塞矩阵转置,矢量化,多线程,编译器友好的代码等,我的速度提高了10倍以上.
来到我的问题:我所使用的代码的最新分析统计数据让我perf stat -e感到困扰.
76,321,873 cache-references
8,647,026,694 cycles # 0.000 GHz
7,050,257,995 instructions # 0.82 insns per cycle
49,739,417 cache-misses # 65.171 % of all cache refs
0.910437338 seconds time elapsed
Run Code Online (Sandbox Code Playgroud)
(缓存未命中数)/(#指令)低约0.7%.这里提到这个数字是检查内存效率的好事.
另一方面,高速缓存未命中高速缓存引用的百分比非常高(65%!),正如我所看到的那样,可以表明在高速缓存效率方面执行出现问题.
详细的统计数据perf stat -d是:
2711.191150 task-clock # 2.978 CPUs utilized
1,421 context-switches # 0.524 K/sec
50 cpu-migrations # 0.018 K/sec
362,533 page-faults # 0.134 M/sec
8,518,897,738 cycles # 3.142 GHz [40.13%]
6,089,067,266 stalled-cycles-frontend # 71.48% frontend …Run Code Online (Sandbox Code Playgroud) 我试图在pycharm中的ubuntu 14.04上安装metaplotlib并获得以下错误:
TypeError:unorderable类型:str()<int()
ubuntu 14.04 64bits pycharm运行python 3
追溯是:
DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated. Downloading/unpacking matplotlib Running setup.py (path:/tmp/pycharm-packaging7.tmp/matplotlib/setup.py) egg_info for package matplotlib
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pycharm-packaging7.tmp/matplotlib/setup.py", line 155, in <module>
result = package.check()
File "/tmp/pycharm-packaging7.tmp/matplotlib/setupext.py", line 961, in check
min_version='2.3', version=version)
File "/tmp/pycharm-packaging7.tmp/matplotlib/setupext.py", line 445, in _check_for_pkg_config
if (not is_min_version(version, min_version)):
File "/tmp/pycharm-packaging7.tmp/matplotlib/setupext.py", line 173, in is_min_version
return found_version >= expected_version
File "/usr/lib/python3.4/distutils/version.py", line 76, in __ge__ …Run Code Online (Sandbox Code Playgroud) caching ×1
install ×1
matplotlib ×1
optimization ×1
perf ×1
performance ×1
python ×1
ubuntu ×1