由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - Fortran and C
相关主题
fortran还是matlab?how to estimate 1-a/b with (a close to b) correct
Should I use C or matlab?求教一个正态分布积分问题
emergency: two ACM transactionsc++变异错误问题
再问个Fortran得问题新手问路:MATLAB 算积分用什么FUNCTION
Fortran 和 C的区别? (转载)look for a software
Calling Cuda Functions from Fortran zmodified bessel function
请教大牛们matlab 里调用c++matlab question (about C mex ...)
normal cumulative function in Cabout global in matlab
相关话题的讨论汇总
话题: fortran话题: move话题: out话题: think
进入Computation版参与讨论
1 (共1页)
p*******s
发帖数: 91
1
We have some Monte Carlo simulation code in Fortran,
it is very slow,
if assuming the code is reasonable written
do you think rewriting it in C will improve the performance a lot?
if just wrap it using C, will speed it ?
thanks
f****r
发帖数: 27
2
Generally speaking, the performance of Fortran 77 program is better than
Fortran 90, while both of them are better than C and C++.
See www.cs.rpi.edu/~nortonc/OOF90/performance.html for some benchmark.

【在 p*******s 的大作中提到】
: We have some Monte Carlo simulation code in Fortran,
: it is very slow,
: if assuming the code is reasonable written
: do you think rewriting it in C will improve the performance a lot?
: if just wrap it using C, will speed it ?
: thanks

p*******s
发帖数: 91
3
thanks a lot

【在 f****r 的大作中提到】
: Generally speaking, the performance of Fortran 77 program is better than
: Fortran 90, while both of them are better than C and C++.
: See www.cs.rpi.edu/~nortonc/OOF90/performance.html for some benchmark.

h***o
发帖数: 539
4
use gnu profile (gprof) to analyze which part is the most time
consuming, then try to optimize that part.

【在 p*******s 的大作中提到】
: We have some Monte Carlo simulation code in Fortran,
: it is very slow,
: if assuming the code is reasonable written
: do you think rewriting it in C will improve the performance a lot?
: if just wrap it using C, will speed it ?
: thanks

n******t
发帖数: 4406
5

~~~
move this out.

【在 f****r 的大作中提到】
: Generally speaking, the performance of Fortran 77 program is better than
: Fortran 90, while both of them are better than C and C++.
: See www.cs.rpi.edu/~nortonc/OOF90/performance.html for some benchmark.

f****r
发帖数: 27
6
Well, the performance of C could be really close to Fortran, but need some
extra work on programming. For example, quoted from
"www.hpcf.cam.ac.uk/C_rant.html",
The bottom line effect of this difficulty easy to see: compiling the standard
sources of LINPACK on babbage achieves 54 MFLOPS in FORTRAN and only
34 MFLOPS in C - significantly in FORTRAN's favour. The use of
(non-portable) directives does improve
this, with equal performance being achievable with C
and FORTRAN on babbage.

【在 n******t 的大作中提到】
:
: ~~~
: move this out.

r*****d
发帖数: 54
7
no, I think Fortran is faster than C in most cases.
Why do you think it is slow?

【在 p*******s 的大作中提到】
: We have some Monte Carlo simulation code in Fortran,
: it is very slow,
: if assuming the code is reasonable written
: do you think rewriting it in C will improve the performance a lot?
: if just wrap it using C, will speed it ?
: thanks

o******d
发帖数: 1552
8
they are comparable, when you check the corresponding assembly codes of
the C and Fortran. this claim is true. Fortran does not support recursion.
if you use recursions in C, but use the functionally equivalent loops in
Fortran, of course Fortran outperforms C.

【在 r*****d 的大作中提到】
: no, I think Fortran is faster than C in most cases.
: Why do you think it is slow?

n******t
发帖数: 4406
9
I think we are talking about a different concept.
the potential speed of a certian language and
the difficulty of an optimize implemention.

【在 f****r 的大作中提到】
: Well, the performance of C could be really close to Fortran, but need some
: extra work on programming. For example, quoted from
: "www.hpcf.cam.ac.uk/C_rant.html",
: The bottom line effect of this difficulty easy to see: compiling the standard
: sources of LINPACK on babbage achieves 54 MFLOPS in FORTRAN and only
: 34 MFLOPS in C - significantly in FORTRAN's favour. The use of
: (non-portable) directives does improve
: this, with equal performance being achievable with C
: and FORTRAN on babbage.

1 (共1页)
进入Computation版参与讨论
相关主题
about global in matlabFortran 和 C的区别? (转载)
[转载] 这叫什么方向?Calling Cuda Functions from Fortran z
有什么软件可以计算modified Mathieu function的值?请教大牛们matlab 里调用c++
[转载] Help!有什么软件可以计算Correlation functionnormal cumulative function in C
fortran还是matlab?how to estimate 1-a/b with (a close to b) correct
Should I use C or matlab?求教一个正态分布积分问题
emergency: two ACM transactionsc++变异错误问题
再问个Fortran得问题新手问路:MATLAB 算积分用什么FUNCTION
相关话题的讨论汇总
话题: fortran话题: move话题: out话题: think