-
Notifications
You must be signed in to change notification settings - Fork 46k
Open
Labels
discussdiscuss a problemdiscuss a problemenhancementNew feature or request or suggestionNew feature or request or suggestionperfectImprove knowledge points or descriptionsImprove knowledge points or descriptions
Description
面向过程 :面向过程性能比面向对象高。 因为类调用时需要实例化,开销比较大,比较消耗资源,所以当性能是最重要的考量因素的时候,比如单片机、嵌入式开发、Linux/Unix等一般采用面向过程开发。
----》》
这个并不是根本原因,面向过程也需要分配内存,计算内存偏移量,Java性能差的主要原因并不是因为它是面向对象语言,而是Java是半编译语言,最终的执行代码并不是可以直接被CPU执行的二进制机械码。
而面向过程语言大多都是直接编译成机械码在电脑上执行,并且其它一些面向过程的脚本语言性能也并不一定比Java好。
guang19, mjiuming, kangyunjie, zhaoshijie1, FenceWomaAnd1Dog and 290 morezengpinlin, liujinhu281, gofreeing, VeejaLiu, Github19951006 and 28 moreAliang99, Ella6824, lackiechan, jesusyxl, hnpyhyz and 19 moreltao6688, Github19951006, hnpyhyz, yuanjinzhong, zyyyx and 13 moreAnOldFather, hnpyhyz, tonypau, weicc96, kazitingou and 17 moreltao6688, liujinhu281, wuxiy, ggzed, chen19-bot and 31 moreltao6688, SCJ1997, Github19951006, mingwanxing, ggzed and 29 more
Metadata
Metadata
Assignees
Labels
discussdiscuss a problemdiscuss a problemenhancementNew feature or request or suggestionNew feature or request or suggestionperfectImprove knowledge points or descriptionsImprove knowledge points or descriptions