python程序员推荐笔记本_Python执行速度:笔记本电脑与台式机

I am running a program that does simple data processing:

parses text

populates dictionaries

calculates some functions over the resulting data

The program only uses CPU, RAM, and HDD:

run from Windows command line

input/output to the local hard drive

nothing displayed on or printed to screen

no networking

The same program is run on:

desktop: Windows 7, i7-930 CPU overclocked @3.6 GHz (with matching memory speed), Intel X-25M SSD

laptop: Windows XP, Intel Core2 Duo T9300 @2.5GHz, 7200 rpm HDD

The CPU is 1.44 faster frequency, HDD is 4 times higher benchmark score (Passmark - Disk Mark). I found the program runs just around 1.66 times faster on the desktop. So apparently, the CPU is the bottleneck.

It seems there's only 15% benefit from the i7 Core vs Intel Core2 Duo architecture (most of the performance boost is due to the straight CPU frequency). Is there anything I can do in the code to increase the benefit of the new architecture?

EDIT: forgot to mention that I use ActivePython 3.1.2 if that matters.

解决方案

The increasing performance of hardware brings in most cases automatically results in benefit to user applications. The much maligned "GIL" means that you may not be able to take advantage of multicores with CPython unless you design your program to take advantage via various multiprocessing modules / libraries.

A related collation of solutions on python wiki: http://wiki.python.org/moin/ParallelProcessing

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值