Questions about optimization

19 views
Skip to first unread message

Peisheng YE

unread,
Jan 7, 2013, 11:37:53 PM1/7/13
to bbtcollege
下面是Carol 有关于Application的一些问题。 请大家帮忙回答。

I have a question now:
How can I optimize my application?
1, one is allocate the memory according to the RAM's mechanism. What is that?
2, I remember we can use some tools to find where is the application's hot spot?

    which tools, how to do it, how to optimize java application?

    Do you have any idea?
3, using compiler option when compile your code. For android java code, Can I just add that option to make file, and how, which option in eclipes.

    in gcc is -O3, right? gcc has optimize code for space or for speed, which option for each of them?

4, Any other way to optimize my java application?

Songbo Du

unread,
Jan 8, 2013, 2:11:39 PM1/8/13
to bbtco...@googlegroups.com
Try to answer some of them. In fact, optimization is really challenge task, I believe. 

1, one is allocate the memory according to the RAM's mechanism. What is that?
A: Remember Teacher Sam said, to test RAM banking with different pattern, after then find the fastest one, which utilize at most the caching? I think what it is.

2, I remember we can use some tools to find where is the application's hot spot?

    which tools, how to do it, how to optimize java application?

    Do you have any idea?
A: Do profiling, of course. There are lots of profiling tools. Depending on which level and what kind of app you are using. Such as Oprofiling on System level. 

Not sure tools for Java specifically. Is any one can help on this?


3, using compiler option when compile your code. For android java code, Can I just add that option to make file, and how, which option in eclipes.

    in gcc is -O3, right? gcc has optimize code for space or for speed, which option for each of them?

It is better not using O3. I think the safest way to use O2 instead.  Or to use any 3rd party compiler.

4, Any other way to optimize my java application?

No idea yet. Lol.
--
Best Regards,
Du, Songbo

Guo Tony

unread,
Jan 8, 2013, 3:30:54 PM1/8/13
to bbtco...@googlegroups.com
I asked a senior Java developer in our company, Jack, Songbo Du knows him.

1. Variable in java does not need to delete manually. That is, use the memory (variable) only necessary.

2. He does not know such tool for Java. He said, in small code segment, Java compiler can optimize it. However, the performance of the whole system can only reply on the designed archtecture. So, maybe, you will focus on the archtecture more.

3. Have a look on your .ant file. It is xml format. You may find some details inside. Though, he has no more suggestion.

4. Also care more about the algorithms and archtecture of your product. Secondly, try to update your processor(it is not the best way). Basically, Java does not have an excellent performance like C or C++.


2013/1/8 Songbo Du <song...@gmail.com>

Peisheng YE

unread,
Jan 8, 2013, 7:59:14 PM1/8/13
to bbtcollege
Thanks so much everyone.
Reply all
Reply to author
Forward
0 new messages