هذه الرسالة تفيد بأنك غير مسجل في في آي بي للبيع والشراء : بيع , شراء , سيارات , ارقام مميزه , لوحات مميزه , رقم مميز , جوال . للتسجيل الرجاء اضغط هنـا

قديم 18-09-13, 05:39 AM   #1
jhseuchpihg

( متسوق جديد )

 

The idea of inlining html code placing the specific code of one small intent at each telephone site is an effectively [فقط الأعضاء المسجلين والمفعلين يمكنهم رؤية الوصلات . إضغط هنا للتسجيل]
known compiler marketing and advertising, which I have layed out before. The software can provide noteworthy performance renovations, due to [فقط الأعضاء المسجلين والمفعلين يمكنهم رؤية الوصلات . إضغط هنا للتسجيل]
the entire elimination of the main call/return sequence. Likewise, stack ingestion is greatly reduced. There is a probable cost if you're considering increased training course memory needs.

It is reasonably priced to expect a first-rate C aka C++ compiler, when explained to compile for speed rate, to perform inlining always. Among those is certainly inline. This is a directive to the compiler contemplating that the functionality is inlined. provided switches insurance policy for small marketers instead of high-speed code]. The inline look for term is also observed in many progressive C compilers, as a good language extension, and pieces in the same way.

Nonetheless , C++ has additional inlining tricks. It is vitally common regarding functions, which happen to be part of things [class member functions] in order to be small and usually with outstanding frequency. Outcome, such succeeds are effective contenders over inlining. They may be released inline in the same way, employing keyword. About the other hand, there is get rid of convey an inlining request within compiler: place the proper code within these class outline, instead of just indicating the function as well as defining the software outside.

As, C++ has a few different ways to statement a function internet marketing inline:

class T1

nullify foo()}class T2

void foo();inline void T2::foo()}

In this code, both classes have an inline function called foo().

This begs a question: what is the difference, in terms of generated code, between these two ways to declare [فقط الأعضاء المسجلين والمفعلين يمكنهم رؤية الوصلات . إضغط هنا للتسجيل]
an inline?

Please post answers as comments or by email. Sorry, there is no prize, but I will post the result as a comment in a week or so.

Inlining depends on the compiler. I worked with gcc and Tensilica compiler (which is based on Open64/SGI).

gcc is quite lame it still doesn have interprocedural analysis/optimization (although gcc 4.5 promises flto option). As a result gcc does not inline functions unless they are in header file. inline keyword is pretty much ignored: gcc can decide to inline a function w/o if it is in a header file or decide not to inline a function with As far as I understand the only criteria is code size which is obviously suboptimal in many cases, especially in C++ code.

To force gcc to inline all the time, __attribute__((always_inline)) must be used. fnoinline option can be used to prevent any inlining which is useful for debugging.





  رد مع اقتباس
إضافة رد

العلامات المرجعية


يتصفح الموضوع حالياً : 1 (0 عضو و 1 ضيف)
 
أدوات الموضوع
انواع عرض الموضوع

ضوابط المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا يمكنك اضافة مرفقات
لا يمكنك تعديل مشاركاتك

BB code متاحة
كود [IMG] متاحة
كود HTML معطلة





جميع الأوقات بتوقيت GMT +3. الساعة الآن 01:10 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
موقع في آي بي للبيع والشراء

للبيع والشراء