久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

是否有 Java 或 C# 的宏工具?

Are there macro facility for Java or C#?(是否有 Java 或 C# 的宏工具?)
本文介紹了是否有 Java 或 C# 的宏工具?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

宏很有用.

因此,我偶爾會感嘆 Java 和 C# 中沒有宏.宏允許我強制內聯,但允許我使用非宏代碼的代碼可管理性.

Therefore, I occasionally bemoan the absence of macros in Java and C#. Macros allow me to force in-line but allow me the code-manageability of non-macro code.

是否有任何基于 Java 或 C# 的項目/產品有效地允許宏或指定內聯擴展.

Is there any Java- or C#-based project/product somewhere out there that effectively allow macros or specifying in-line expansion.

我正在考慮類似的事情

@macro public void hello(int x){ ... }

@macro public void hello(int x){ ... }

或者當我調用一個方法時,調用前的@inline 注釋會影響被調用方法的內聯.

or when I call a method, an @inline annotation preceding the call would effect the called-method to be in-lined.

或者,我是否需要知道我應該相信編譯器會為我做出最好的決定,即在最好的分析情況下,它可能會內聯調用.

or, should I need to know that I should just trust the compiler to make the best the decision for me that at the best of its analysis it might in-line a call.

我希望這個問題不會導致爭論宏的優缺點/有用性.

I hope this question will not lead to debating the pro/cons/usefulness of macros.

推薦答案

宏不是標準 Java 語言的一部分,我不知道主流 Java 工具、IDE 等是否支持任何宏預處理器.因此,如果您在 Java 代碼中使用宏,您應該會體驗到一些痛苦".例如,

Macros are not part of the standard Java language, and I'm not aware of any macro preprocessor being supported by mainstream Java tools, IDEs and so on. So if you use macros in your Java code you should expect to experience some "pain". For example,

  • 源代碼調試器不允許您相對于原始源代碼設置斷點.
  • 如果您與宏共享 Java 代碼,許多 Java 開發人員可能會對此嗤之以鼻,和/或抱怨必須安裝/使用額外的工具.

Java 的第三方宏預處理器有很多例子;例如Jatha, OpenJava, PrintMacroJ、JavaMacros 等等...(但你有沒有遇到過使用它們的項目?)

There are quite a few examples of third-party macro pre-processors for Java; e.g. Jatha, OpenJava, PrintMacroJ, JavaMacros, and so on ... (But have you ever come across a project that uses any of them?)

宏允許我強制內聯,但允許我使用非宏代碼的代碼可管理性.

Macros allow me to force in-line but allow me the code-manageability of non-macro code.

沒錯.但是 JIT 編譯器在確定 應該 內聯的內容方面可能比您做得更好.它會(肯定地)知道這些塊有多大,并且它會有關于執行頻率、分支預測等的運行時統計信息,這些對你來說是不可用的.

True. But the JIT compiler can probably do a better job than you can in determining what should be inlined. It will know (for sure) how big the chunks are, and it will have runtime stats on execution frequency, branch prediction, etc that are not available to you.

請注意,有一些 Hotspot JVM 調優選項會影響優化器的內聯決策;請參閱 此頁面,并掃描inlin".例如,有一個似乎允許您增加內聯方法體的大小上限.

Note that there are some Hotspot JVM tuning options that can influence the optimizer's decisions on inlining; see this page, and scan for "inlin". For instance, there is one that seems to allow you to increase the upper size threshold for an inlined method body.

這篇關于是否有 Java 或 C# 的宏工具?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期時間,就像在 UTC 中一樣)
How to convert Gregorian string to Gregorian Calendar?(如何將公歷字符串轉換為公歷?)
Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日歷到日期轉換.公歷到儒略歷切換)
java Calendar setFirstDayOfWeek not working(java日歷setFirstDayOfWeek不起作用)
Java: getting current Day of the Week value(Java:獲取當前星期幾的值)
主站蜘蛛池模板: 色www精品视频在线观看 | 亚洲精品一区二区网址 | 亚洲成人播放器 | av天天澡天天爽天天av | 日本久久久久久久久 | 日韩国产高清在线观看 | 四虎精品在线 | 久久久网 | 亚洲天堂影院 | 欧美男人亚洲天堂 | 欧美日韩成人 | 91免费看片神器 | 亚洲一区二区在线免费观看 | 在线观看亚洲专区 | 日韩一级 | 久久国产一区二区三区 | 成人av一区二区三区 | 国产精品爱久久久久久久 | 一级日批片 | 欧美bondage紧缚视频 | 国产高清精品在线 | 亚洲精品日日夜夜 | 中文字幕第一页在线 | 免费同性女女aaa免费网站 | 黄色小视频入口 | 亚洲国产成人精品在线 | 亚洲播放一区 | 99久久国产综合精品麻豆 | 欧美日韩在线视频一区二区 | 国产 欧美 日韩 一区 | 中文字幕1区 | 在线精品一区 | 特级黄一级播放 | 国产一区二区久久久 | 精品一区二区三区在线观看 | 91av导航| 一区二区三区日韩 | 久久亚洲综合 | 亚洲精品在线视频 | 污片在线观看 | 免费看淫片|