c*t
2 楼
You can improve this code significantly without much more typing.
1. When you know the size, just use simple array, int[].
It's significantly faster without having to create
extra objects, calling a number of functions (including
inside the implementation as well).
2. Avoid autoboxing. It calls about 2+ functions and create
an object (a very expensive operation), both are
significantly slower.
3. Use StringBuffer to significantly reduce the memory usage
and runs significantly
【在 b*******r 的大作中提到】
: Done
1. When you know the size, just use simple array, int[].
It's significantly faster without having to create
extra objects, calling a number of functions (including
inside the implementation as well).
2. Avoid autoboxing. It calls about 2+ functions and create
an object (a very expensive operation), both are
significantly slower.
3. Use StringBuffer to significantly reduce the memory usage
and runs significantly
【在 b*******r 的大作中提到】
: Done
b*r
3 楼
Thank you veli veli much.
相关阅读
用脚趾头想,message queue有次序的,分布出去能收回来么?我还是对王垠持基本肯定态度Wei和虫我看是说不到一块了做Java的来说说说同步比异步快的根本不懂网站很多时候性能问题的关键不在后端whois mitbbs.com高手详解12306 IT架构与困境(转载)重新贴一次goodbug的要求严格意义上说,java的lambda其实是想起了前阵子老姜贴的Programmer Personality测试计数器都能说上三个月这个要是能单机勉强做到1MM,算是合格中学生么?想起当年的国足goodbug和赵策是属于给脸不要脸的Any examples for implementing user-level threads library in C?老魏算了半天就是要告诉别人,某个硬件合格了据说Bill Gates要回微软工作好虫说下netflix高并发在哪里?算了,来这儿的都不是诚心讨论技术的