-optimize
Enables or disables compiler optimizations.
Syntax
-optimize[ + | - ]
Arguments
Term | Definition |
---|---|
+ | - |
Optional. The -optimize- option disables compiler optimizations. The -optimize+ option enables optimizations. By default, optimizations are disabled. |
Remarks
Compiler optimizations make your output file smaller, faster, and more efficient. However, because optimizations result in code rearrangement in the output file, -optimize+
can make debugging difficult.
All modules generated with -target:module
for an assembly must use the same -optimize
settings as the assembly. For more information, see -target (Visual Basic).
You can combine the -optimize
and -debug
options.
To set -optimize in the Visual Studio integrated development environment |
---|
1. Have a project selected in Solution Explorer. On the Project menu, click Properties. 2. Click the Compile tab. 3. Click the Advanced button. 4. Modify the Enable optimizations check box. |
Example
The following code compiles T2.vb
and enables compiler optimizations.
vbc t2.vb -optimize
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.
الملاحظات
https://aka.ms/ContentUserFeedback.
قريبًا: خلال عام 2024، سنتخلص تدريجيًا من GitHub Issues بوصفها آلية إرسال ملاحظات للمحتوى ونستبدلها بنظام ملاحظات جديد. لمزيد من المعلومات، راجعإرسال الملاحظات وعرضها المتعلقة بـ