Redian新闻
>
help for running CPU intensive program!!
avatar
help for running CPU intensive program!!# Java - 爪哇娇娃
m*r
1
I have a numerical analysis program written in Java. It takes natural
numbers and does some computations and produces interesting output. It's
very CPU/memory intensive. The fastest machine I can access, a P4 Linux
server with 1G memory, can only handle up to 19. Wonder if someone here can
help me to get more results. What you have to do is pretty simple - run the
program and send me the output. It should run fine on JDK 1.2 or higher. If
you are interested, please leave your email below or send
avatar
st
2
tried to improvement the speed with dynamic programming?
and tried to use C/C++ instead of java?

【在 m********r 的大作中提到】
: I have a numerical analysis program written in Java. It takes natural
: numbers and does some computations and produces interesting output. It's
: very CPU/memory intensive. The fastest machine I can access, a P4 Linux
: server with 1G memory, can only handle up to 19. Wonder if someone here can
: help me to get more results. What you have to do is pretty simple - run the
: program and send me the output. It should run fine on JDK 1.2 or higher. If
: you are interested, please leave your email below or send

avatar
f*h
3
profiling your code.

【在 m********r 的大作中提到】
: I have a numerical analysis program written in Java. It takes natural
: numbers and does some computations and produces interesting output. It's
: very CPU/memory intensive. The fastest machine I can access, a P4 Linux
: server with 1G memory, can only handle up to 19. Wonder if someone here can
: help me to get more results. What you have to do is pretty simple - run the
: program and send me the output. It should run fine on JDK 1.2 or higher. If
: you are interested, please leave your email below or send

avatar
r*s
4
maybe you can use something like condor to use the shared
computing resources?

【在 m********r 的大作中提到】
: I have a numerical analysis program written in Java. It takes natural
: numbers and does some computations and produces interesting output. It's
: very CPU/memory intensive. The fastest machine I can access, a P4 Linux
: server with 1G memory, can only handle up to 19. Wonder if someone here can
: help me to get more results. What you have to do is pretty simple - run the
: program and send me the output. It should run fine on JDK 1.2 or higher. If
: you are interested, please leave your email below or send

avatar
g*g
5
You should isolate your problem first. If it's just that your CPU is not fast
enough, it would be slow, but still able to handle. If you are short of
memory. Add memory, increase xmx, put your unused large object into null, or
consider C/C++ alternative.

【在 m********r 的大作中提到】
: I have a numerical analysis program written in Java. It takes natural
: numbers and does some computations and produces interesting output. It's
: very CPU/memory intensive. The fastest machine I can access, a P4 Linux
: server with 1G memory, can only handle up to 19. Wonder if someone here can
: help me to get more results. What you have to do is pretty simple - run the
: program and send me the output. It should run fine on JDK 1.2 or higher. If
: you are interested, please leave your email below or send

avatar
c*t
6
1. make sure that you used the best algorithm for the problem.
Use Greedy, Dynamic Programming, Divide-n-Conquer etc rather
than brute force.
2. use a profiler to determine where the problem lies. javap,
which is included with JDK, is a simple enough profiler that
you could use.
3. general java optimization tips:
1. avoid memory allocations (i.e. reduce object creation).
This is particularly true if you are doing grid computing.
If you are not careful, you could be al

【在 m********r 的大作中提到】
: I have a numerical analysis program written in Java. It takes natural
: numbers and does some computations and produces interesting output. It's
: very CPU/memory intensive. The fastest machine I can access, a P4 Linux
: server with 1G memory, can only handle up to 19. Wonder if someone here can
: help me to get more results. What you have to do is pretty simple - run the
: program and send me the output. It should run fine on JDK 1.2 or higher. If
: you are interested, please leave your email below or send

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