Solved

C# - What is "tight loop code"?

Posted on 2013-01-29
4
511 Views
Last Modified: 2013-02-24
In the following article the author VB Rocks refers to "tight loop code". What is "tight loop code"?

http://www.codeproject.com/Articles/38555/WPF-ProgressBar

There are many situations where "tight loops" are required in code, such as when data is being read from a file. A standard coding approach is to open the file, then loop through the entire file, reading either lines, characters, or bytes in each pass. A progress bar may be used to report the progress of this operation.
0
Comment
Question by:jdana
4 Comments
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 116 total points
Comment Utility
From Wiktionary:

(computing) In assembly languages, a loop which contains few instructions and iterates many times.
(computing) Such a loop which heavily uses I/O or processing resources, failing to adequately share them with other programs running in the operating system.
For case 1 it is probably like

for (unsigned int i = 0; i < 0xffffffff; ++ i) {}
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 117 total points
Comment Utility
Looking at the article my opinion is that in a tight loop (in WPF) the interface is given no chance to update.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 117 total points
Comment Utility
A block of code which loops but does not release any resources during the loop.
0
 

Author Closing Comment

by:jdana
Comment Utility
AndyAinscow and CodeCruiser - I agree, in the context of this article, "tight-loop" code is code that's opaque to other processes (and the GUI).
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now