> I was just wondering, what would be a practical application of this
routine?  

As you probably don't know, I'm doing a lot of process control with Delphi.
And I frequently have to process bit collections.

>  wouldn't it be more efficient to just shift the value to the left
directly without the abstraction of the enumerator?

Yes, that's what I said in the article. Most abstractions, if not all are
always slower than specially crafted code. However frequently efficiency is
not the most interesting factor: ease of write and readability of code tend
to be more important than speed. Usually, speed isn't an issue when you have
an i7 processor at 2GHz as it is when you have a 8 bits microcontroller
running at 1MHz :-)

And as I said in the article, this code has the advantage of being very
simple and help people learn what they can do with an enumerator and how
they can use it in their own application.

http://francois-piette.blogspot.be/2013/01/original-method-to-iterate-bits-w
ithin.html


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to