Performance Tips and Tricks in. NET Applications (5

Source: Internet
Author: User

What You Can Do
At every phase of development, there are several things you can do. with MC ++, the design phase is perhaps the most important area, as it will determine how much work you end up doing and how much performance you get in return. when you sit down to write or port an application, you shoshould consider the following things: Identify areas where you use multiple inheritance, templates, or deterministic finalization. you will have to get rid of these, or else leave that part of your code in unmanaged space. think about the cost of redesigning, and identify areas that can be ported. locate performance hot spots, such as deep dive actions or virtual function cballs manage SS managed space. these will also require a design demo. look for objects that have been specified as stack-managed. make sure they can be converted into ValueTypes. mark the others for conversion to heap-managed objects.
During the coding stage, you shocould be aware of the operations that are more expensive and the options you have in dealing with them. one of the nicest things about MC ++ is that you come to grips with all the performance issues up front, before you start coding: this is helpful in paring down work later on. however, there are still some tweaks you can perform while you code and debug.
Determine which areas make heavy use of floating point arithmetic, multidimen1_arrays or library functions. Which of these areas are performance critical? Use profilers to pick the fragments where the overhead is costing you most, and pick which option seems best: Keep the whole fragment in unmanaged space. use static casts on the library accesses. try tweaking boxing/unboxing behavior (explained later ). code your own structure.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.