linux下运行python与windows速度差别,Linux和Windows之间的numpy性能差异

I am trying to run sklearn.decomposition.TruncatedSVD() on 2 different computers and understand the performance differences.

computer 1 (Windows 7, physical computer)

OS Name Microsoft Windows 7 Professional

System Type x64-based PC

Processor Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3401 Mhz, 4 Core(s),

8 Logical Installed Physical Memory (RAM) 8.00 GB

Total Physical Memory 7.89 GB

computer 2 (Debian, on amazon cloud)

Architecture: x86_64

CPU op-mode(s): 32-bit, 64-bit

Byte Order: Little Endian

CPU(s): 8

width: 64 bits

capabilities: ldt16 vsyscall32

*-core

description: Motherboard

physical id: 0

*-memory

description: System memory

physical id: 0

size: 29GiB

*-cpu

product: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz

vendor: Intel Corp.

physical id: 1

bus info: cpu@0

width: 64 bits

computer 3 (Windows 2008R2, on amazon cloud)

OS Name Microsoft Windows Server 2008 R2 Datacenter

Version 6.1.7601 Service Pack 1 Build 7601

System Type x64-based PC

Processor Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz, 2500 Mhz,

4 Core(s), 8 Logical Processor(s)

Installed Physical Memory (RAM) 30.0 GB

Both computers are running with Python 3.2 and identical sklearn, numpy, scipy versions

I ran cProfile as follows:

print(vectors.shape)

>>> (7500, 2042)

_decomp = TruncatedSVD(n_components=680, random_state=1)

global _o

_o = _decomp

cProfile.runctx('_o.fit_transform(vectors)', globals(), locals(), sort=1)

computer 1 output

>>> 833 function calls in 1.710 seconds

Ordered by: internal time

ncalls tottime percall cumtime percall filename:lineno(function)

1 0.767 0.767 0.782 0.782 decomp_svd.py:15(svd)

1 0.249 0.249 0.249 0.249 {method

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值