我用Java和C++运行了小型测试,创建了大量非常小的对象(没有类成员,构造函数中也没有),而且Java明显更快(我的意思是C++似乎真的很慢)。我打赌这与JVM有关,但是用哪种方式呢?编辑:class foo{ foo(){}在Java中: public Foo(){}我做的小测试只是关于在循环中分配成吨的对象
start myservice
stop myservice6944 6974 V myservice: IMyProcessA::onTransact()
712 712 I AP_KERNEL: init:712 I AP_KERNEL: init: Service 'myservice' (pid 6944) killing any childre