avatar
M*n
1
When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom,
"Write in C."
As the deadline fast approaches,
and bugs are all that I can see
Somewhere, someone whispers:
"Write in C."
Write in C, Write in C,
Write in C, oh, Write in C.
Logo's dead and buried,
Write in C.
I used to write a lot of FORTRAN.
For science it worked flawlessly.
T
avatar
a*s
2
faint... C is not that great as a computing language bah.
avatar
h*o
3
I like it..but boss won't allow :(

【在 a*****s 的大作中提到】
: faint... C is not that great as a computing language bah.
avatar
s*y
4
那你老板推荐用什么?

【在 h***o 的大作中提到】
: I like it..but boss won't allow :(
avatar
a*s
5
Fortran...whatelse...

【在 s****y 的大作中提到】
: 那你老板推荐用什么?
avatar
b*u
6
hehe
the same here
we even stick to fortran 77
thought myself wrote a lot in c++
but the speed cannot compete with fortran....
avatar
w*g
7
Fortran is better than C and CPP for traditional scientific computing, as least
a lot of resources are avaiable... Even though I myself mostly write code in
Fortran 90 and C++, F77 is still the best if speed is concerned...

【在 b*******u 的大作中提到】
: hehe
: the same here
: we even stick to fortran 77
: thought myself wrote a lot in c++
: but the speed cannot compete with fortran....

avatar
h*o
8
I will try to use f90 for my phd thesis
f77 is really awkward

【在 b*******u 的大作中提到】
: hehe
: the same here
: we even stick to fortran 77
: thought myself wrote a lot in c++
: but the speed cannot compete with fortran....

avatar
h*o
9
really?
that's bad...I just hate f77's style

【在 w*******g 的大作中提到】
: Fortran is better than C and CPP for traditional scientific computing, as least
: a lot of resources are avaiable... Even though I myself mostly write code in
: Fortran 90 and C++, F77 is still the best if speed is concerned...

avatar
t*n
10
Well, the speed of F90 is comparable with F77, if you don't use the pointer.
The compiler always fails to optimise the code whtn there were a lot
of pointers.

【在 h***o 的大作中提到】
: really?
: that's bad...I just hate f77's style

avatar
w*g
11
Yes, that's true. My dynamic allocated arrays make my code runs much slower...

【在 t****n 的大作中提到】
: Well, the speed of F90 is comparable with F77, if you don't use the pointer.
: The compiler always fails to optimise the code whtn there were a lot
: of pointers.

avatar
t*n
12
That could be bad usage of cache.

【在 w*******g 的大作中提到】
: Yes, that's true. My dynamic allocated arrays make my code runs much slower...
avatar
w*g
13
Could you please state it more clearly? What would be the solution to this issue
then? Thank you!

【在 t****n 的大作中提到】
: That could be bad usage of cache.
avatar
t*n
14
Is the leading unit of your array equal to 2^n? If so, just change it to 2^n+1
to see what happens.
For a fixed size array, the compiler can optimize the code to be cache
friendly. But for dynamic allocated array, it's almost impossible, since
the compiler doesn't know the size information in advance.

【在 w*******g 的大作中提到】
: Could you please state it more clearly? What would be the solution to this issue
: then? Thank you!

avatar
s*y
15
en,我老板手下的学生作了个小软件用的是vb+fortran.
不过轮到我就全用了c++.主要是我自己对fortran不熟悉.

【在 h***o 的大作中提到】
: I like it..but boss won't allow :(
avatar
M*n
16
so C or C++ will also do bad job in this situation, right?
by the way, what's the meaning of leading unit?

【在 t****n 的大作中提到】
: Is the leading unit of your array equal to 2^n? If so, just change it to 2^n+1
: to see what happens.
: For a fixed size array, the compiler can optimize the code to be cache
: friendly. But for dynamic allocated array, it's almost impossible, since
: the compiler doesn't know the size information in advance.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。