由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 一个简单得java程序,
相关主题
这两个地方是否需要typename?Why C++11 introduce "decltype" and "auto"?
请教 一个c++ lambda function 的问题珍惜生命,远离 R 和 Go
问个node.js的问题python 3.5 typing hint普及之後 python真要統治世界了。
golang的reflectioninline functions in C++
问个java String问题How can matlab loop over functions
Q: 2 submit buttons in 1 page (转载)A C++ private member function problem
StringBufferfunction pointer 和 call-back function 有什么区别?
Node.js 有用过的么 什么评价virtual function question
相关话题的讨论汇总
话题: use话题: functions话题: create话题: veli
进入Programming版参与讨论
1 (共1页)
b*******r
发帖数: 311
1
Done
c*****t
发帖数: 1879
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
b*******r
发帖数: 311
3
Thank you veli veli much.
1 (共1页)
进入Programming版参与讨论
相关主题
virtual function question问个java String问题
about STL functor and function pointersQ: 2 submit buttons in 1 page (转载)
关于闭包,我发明了一个绝妙陷阱StringBuffer
aspect programing 就是 functional programing吗?Node.js 有用过的么 什么评价
这两个地方是否需要typename?Why C++11 introduce "decltype" and "auto"?
请教 一个c++ lambda function 的问题珍惜生命,远离 R 和 Go
问个node.js的问题python 3.5 typing hint普及之後 python真要統治世界了。
golang的reflectioninline functions in C++
相关话题的讨论汇总
话题: use话题: functions话题: create话题: veli