C程序在Win98 DOS shell上运行缓慢 [英] C program verrrry slow on Win98 DOS shell

查看:66
本文介绍了C程序在Win98 DOS shell上运行缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我在C中编写了一个程序,它花了大部分时间做整数

算术(在运行时加载的数据集上),可忽略不计的

I / O量。我用lcc-win32作为控制台应用程序编译它。

该程序用了10个小时来处理特定批量的数据。我还用Open Watcom 1.1编译了
,结果相似。但是,我用bcc编译了这个程序(我有一个双启动系统)和gcc,

并且需要12分钟来处理相同的数据。有人可以回答:

我在DOS上的瓶颈在哪里?


我在Windows 98上运行控制台作为DOS shell在Athlon上运行/>
XP 1900+,512 MB RAM。我只使用标准的C库。我的

config.sys文件为空。我的Autoexec.bat文件只包含PATH

信息。我是否需要为emm386,himem以及所有

rot添加行?或者它完全是另一回事?请指教。谢谢。

解决方案

Brett写道:


嗨。我在C中编写了一个程序,它花费大部分时间进行整数运算(在运行时加载的数据集上),I / O量可忽略不计。我用lcc-win32作为控制台应用程序编译它。
该程序用了10个小时来处理特定批量的数据。我还用Open Watcom 1.1编译了类似的结果。但是,我在Linux上编译了程序(我有一个双启动系统)和gcc,
并且需要12分钟来处理相同的数据。有人可以回答:
我在DOS上的瓶颈在哪里?




所有数据都发送到Microsoft服务器进行存储和分析: - )

/ david


-

安德烈,一个简单的农民,只有一件事在他心中悄悄走了东墙上的
:''安德烈,蠕动......安德烈,蠕动......安德烈,悄悄。''

- 未知


Brett写道:

嗨。我在C中编写了一个程序,它花费大部分时间进行整数运算(在运行时加载的数据集上),I / O量可忽略不计。我用lcc-win32作为控制台应用程序编译它。
该程序用了10个小时来处理特定批量的数据。我还用Open Watcom 1.1编译了类似的结果。但是,我在Linux上编译了程序(我有一个双启动系统)和gcc,
并且需要12分钟来处理相同的数据。有人可以回答:
我在DOS上的瓶颈在哪里?

我在Windows 98上在Athlon上运行控制台作为DOS shell
XP 1900+,512 MB内存。我只使用标准的C库。我的
config.sys文件为空。我的Autoexec.bat文件只包含PATH
信息。我需要为emm386,himem和所有那些腐烂添加线条吗?或者它完全是另一回事?请指教。谢谢。




你使用int,short还是long?平原,近,远,巨大的指针?


-

Michel Bardiaux

Peaktime Belgium S.A. Bd。 du Souverain,191 B-1160 Bruxelles

电话:+32 2 790.29.41


在comp.lang.c Brett < CA ****** @ yahoo.com>写道:

嗨。我在C中编写了一个程序,它花费大部分时间进行整数运算(在运行时加载的数据集上),I / O量可忽略不计。我用lcc-win32作为控制台应用程序编译它。
该程序用了10个小时来处理特定批量的数据。我还用Open Watcom 1.1编译了类似的结果。但是,我在Linux上编译了程序(我有一个双启动系统)和gcc,
并且需要12分钟来处理相同的数据。有人可以回答:
我在DOS上的瓶颈在哪里?




有一个关于优化问题的有趣线程

comp.lang.c ++。moderated(巨大的C ++优化空洞),可能是

相关......


-

Christopher Benson-Manica |我*应该*知道我在说什么 - 如果我

ataru(at)cyberspace.org |不,我需要知道。火焰欢迎。


Hi. I wrote a program in C that spends most of its time doing integer
arithmetic (on a data set loaded at run time), with a negligible
amount of I/O. I compiled it with lcc-win32 as a console application.
The program took 10 hrs to crunch a particular batch of data. I also
compiled with Open Watcom 1.1 with similar results. However, I
compiled the program on Linux (I have a dual boot system) with gcc,
and it took 12 MINUTES to crunch the same data. Can someone answer:
where is my bottleneck on DOS?

I''m running the console as a DOS shell under Windows 98 on an Athlon
XP 1900+ with 512 MB ram. I''m only using the standard C libraries. My
config.sys file is empty. My Autoexec.bat file only contains PATH
information. Do I need to add lines for emm386, himem, and all that
rot? Or is it something else entirely? Please advise. Thanks.

解决方案

Brett wrote:


Hi. I wrote a program in C that spends most of its time doing integer
arithmetic (on a data set loaded at run time), with a negligible
amount of I/O. I compiled it with lcc-win32 as a console application.
The program took 10 hrs to crunch a particular batch of data. I also
compiled with Open Watcom 1.1 with similar results. However, I
compiled the program on Linux (I have a dual boot system) with gcc,
and it took 12 MINUTES to crunch the same data. Can someone answer:
where is my bottleneck on DOS?



All your data is sent to a Microsoft server for storage and analysis :-)

/david

--
Andre, a simple peasant, had only one thing on his mind as he crept
along the East wall: ''Andre, creep... Andre, creep... Andre, creep.''
-- unknown


Brett wrote:

Hi. I wrote a program in C that spends most of its time doing integer
arithmetic (on a data set loaded at run time), with a negligible
amount of I/O. I compiled it with lcc-win32 as a console application.
The program took 10 hrs to crunch a particular batch of data. I also
compiled with Open Watcom 1.1 with similar results. However, I
compiled the program on Linux (I have a dual boot system) with gcc,
and it took 12 MINUTES to crunch the same data. Can someone answer:
where is my bottleneck on DOS?

I''m running the console as a DOS shell under Windows 98 on an Athlon
XP 1900+ with 512 MB ram. I''m only using the standard C libraries. My
config.sys file is empty. My Autoexec.bat file only contains PATH
information. Do I need to add lines for emm386, himem, and all that
rot? Or is it something else entirely? Please advise. Thanks.



Do you use int, short or long? Plain, near, far, huge pointers?

--
Michel Bardiaux
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41


In comp.lang.c Brett <ca******@yahoo.com> wrote:

Hi. I wrote a program in C that spends most of its time doing integer
arithmetic (on a data set loaded at run time), with a negligible
amount of I/O. I compiled it with lcc-win32 as a console application.
The program took 10 hrs to crunch a particular batch of data. I also
compiled with Open Watcom 1.1 with similar results. However, I
compiled the program on Linux (I have a dual boot system) with gcc,
and it took 12 MINUTES to crunch the same data. Can someone answer:
where is my bottleneck on DOS?



There''s an interesting thread regarding optimization issues on
comp.lang.c++.moderated ("Huge C++ Optimization Hole") that might possibly be
relevant...

--
Christopher Benson-Manica | I *should* know what I''m talking about - if I
ataru(at)cyberspace.org | don''t, I need to know. Flames welcome.


这篇关于C程序在Win98 DOS shell上运行缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆