枪战(总和档案) [英] Shootout (sum-file)

查看:78
本文介绍了枪战(总和档案)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



2008年4月30日星期三08:00:38 -0700(太平洋时间),Isaac Gouy

< ig **** @ yahoo.comwrote:


On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<ig****@yahoo.comwrote:


>为什么不通过所有...
>Why don''t you go through all...



让's'继续。接下来我们处理sum-file ......

http://shootout.alioth.debian.org/gp...lang=all#about


" ;程序应该使用内置的面向行的I / O函数,而不是使用
自定义代码。任何行都不会超过128个字符,包括换行符。

一次读一行,程序应该在不断的空间内运行。

根据Haskel的说法,


那些家伙告诉我们这些基准测试不赞成C然后施加

限制线长?如果不允许使用C'的getline()原语,那么目的是什么呢?"


那是什么?您需要解决的有效问题。为什么128个字符

限制如果不帮助C和C ++家伙?


无论如何,

C ++
http:// shootout.alioth.debian.org/de...&lang=gpp&id=2

Java
http://shootout.alioth.debian.org/ de ... lang = java& id = 2

和用于测试的14 MB自定义文件..


1.291 s(g ++)

0.742s(java -server)

0.706s(jet java net compiler)


嗯?对c ++和g ++感到羞耻。尽管定制帮助,为什么还要慢?

由Isaac Gouy提供,他施加了人为的128字符限制?

再次在C ++中失望。

Let''s continue. Next we deal with sum-file...

http://shootout.alioth.debian.org/gp...lang=all#about

"Programs should use built-in line-oriented I/O functions rather than
custom-code. No line will exceed 128 characters, including newline.
Reading one line at a time, the programs should run in constant
space."

According to Haskel people,

"Those guys tell us these benchmarks don''t favor C and then impose a
limit on line length? What''s the purpose of that if not to allow the
use of C''s getline() primitive?"

That''s a valid point that you need to address. Why 128 characters
limit if not to help C and C++ guys?

In any case,
C++
http://shootout.alioth.debian.org/de...&lang=gpp&id=2

Java
http://shootout.alioth.debian.org/de...lang=java&id=2

and 14 MB custom file used to test..

1.291s (g++)
0.742s (java -server)
0.706s (jet java net compiler)

Huh? Shame on c++ and g++. Why is still slower despite custom help
provided by Isaac Gouy who imposed artificial 128 char line limit?
Disappointed in C++, once again.

推荐答案

Razik说:
Razik said:

>

2008年4月30日星期三08: 00:38 -0700(PDT),Isaac Gouy

< ig **** @ yahoo.comwrote:
>
On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<ig****@yahoo.comwrote:

>> ;为什么不经历所有... ...
>>Why don''t you go through all...



让我们继续。接下来我们处理sum-file ......


Let''s continue. Next we deal with sum-file...

http://shootout.alioth.debian.org/gp...lang=all#about


>

程序应该使用内置的面向行的I / O函数,而不是使用
自定义代码。任何行都不会超过128个字符,包括换行符。

一次读一行,程序应该在不断的空间内运行。

根据Haskel的说法,


那些家伙告诉我们这些基准测试不赞成C然后施加

限制线长?如果不允许使用C'的getline()原语,那么目的是什么?
>
"Programs should use built-in line-oriented I/O functions rather than
custom-code. No line will exceed 128 characters, including newline.
Reading one line at a time, the programs should run in constant
space."

According to Haskel people,

"Those guys tell us these benchmarks don''t favor C and then impose a
limit on line length? What''s the purpose of that if not to allow the
use of C''s getline() primitive?"



C没有getline()原语。

C doesn''t have a getline() primitive.


这是一个有效点你需要解决的问题。为什么128个字符

限制
That''s a valid point that you need to address. Why 128 characters
limit



不知道。

No idea.


if if not to to帮助C和C ++的家伙?
if not to help C and C++ guys?



这不是原因。

That ain''t the reason.


>

无论如何,

C ++
>
In any case,
C++

http://shootout.alioth.debian.org/de...&lang=gpp&id=2


>

Java
>
Java

http://shootout.alioth.debian.org/de...lang=java&id=2


>

和用于测试的14 MB自定义文件..


1.291s(g ++)

0.742s(java -server)

0.706s(jet java net compiler)


嗯?对c ++和g ++感到羞耻。
>
and 14 MB custom file used to test..

1.291s (g++)
0.742s (java -server)
0.706s (jet java net compiler)

Huh? Shame on c++ and g++.



不,对编写C ++版本的人感到羞耻。在编写基准程序之前,他们可能想要学习

C ++。

No, just shame on whoever wrote the C++ version. They might want to learn
C++ before writing benchmark programs.


尽管有自定义帮助,为什么仍然较慢

由Isaac Gouy提供,他施加了人为的128字符限制?

再一次在C ++中失望。
Why is still slower despite custom help
provided by Isaac Gouy who imposed artificial 128 char line limit?
Disappointed in C++, once again.



为什么?亲爱的Razik,错误不在于我们的语言,而在于我们的作者。

在我的系统上,C ++版本和Java版本都不会编译。


-

Richard Heathfield< http://www.cpax.org.uk>

电子邮件:-http:// www。 + rjh @

谷歌用户:< http://www.cpax.org.uk/prg/writings/googly.php>

Usenet是一个奇怪的放置" - dmr 1999年7月29日

Why? The fault, dear Razik, lies not in our languages, but in our authors.
On my system, neither the C++ version nor the Java version would compile.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999


2008年5月6日星期二05:49:03 +0000,Richard Heathfield

< rj * @ see .sig.invalidwrote:


这至少是一个很好的改变。而不是从巨魔那里发布滥用广告,你至少发布了一些关于主题的内容。你不应该因为没有拖钓而受到赞赏。
On Tue, 06 May 2008 05:49:03 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:

This was at least a nice change. Instead of abusive ad hominem posts
from the trolls, you posted at least something on topic. You should be
commended for not trolling.

>为什么?亲爱的Razik,错误不在于我们的语言,而在于我们的作者。
在我的系统上,C ++版本和Java版本都不会编译。
>Why? The fault, dear Razik, lies not in our languages, but in our authors.
On my system, neither the C++ version nor the Java version would compile.



或许你应该贡献更好的C ++版本来拍摄

网站?我只能根据可用的东西判断。您使用的是什么样的

编译器? C ++我能理解,但为什么你的系统上没有Java?$ / b


Perhaps then you should contribute the better C++ version to shootout
site? I can only judge by what is available. And what kind of
compilers are you using? C++ I can understand, but why won''t Java
version compile on your system?


" Razii" < hk **** @ gmail.com写信息

新闻:6r ************************** ****** @ 4ax.com ...
"Razii" <hk****@gmail.comwrote in message
news:6r********************************@4ax.com...

On Tue,2008年5月6日05:49:03 +0000,Richard Heathfield

< rj *@see.sig.invalidwrote:


这至少是一个很好的改变。而不是从巨魔那里发布滥用广告,你至少发布了一些关于主题的内容。你不应该因为没有拖钓而受到赞赏。
On Tue, 06 May 2008 05:49:03 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:

This was at least a nice change. Instead of abusive ad hominem posts
from the trolls, you posted at least something on topic. You should be
commended for not trolling.

>>为什么?亲爱的Razik,错误不在于我们的语言,而在于我们的作者。
在我的系统上,C ++版本和Java版本都不会编译。
>>Why? The fault, dear Razik, lies not in our languages, but in our authors.
On my system, neither the C++ version nor the Java version would compile.



也许那么你应该贡献更好的C ++版本来枪战

网站?我只能根据可用的东西判断。您使用的是什么样的

编译器? C ++我能理解,但为什么你的系统上没有Java?
版本编译?


Perhaps then you should contribute the better C++ version to shootout
site? I can only judge by what is available. And what kind of
compilers are you using? C++ I can understand, but why won''t Java
version compile on your system?



嗯,多少

Well, how much


这篇关于枪战(总和档案)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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