Click here to Skip to main content
15,911,524 members
Home / Discussions / C#
   

C#

 
GeneralRe: Read pdf file and write content in a doc file with images preserved Pin
inzibharti8-Jan-09 1:54
inzibharti8-Jan-09 1:54 
AnswerRe: Read pdf file and write content in a doc file with images preserved Pin
Wendelius7-Jan-09 1:11
mentorWendelius7-Jan-09 1:11 
GeneralRe: Read pdf file and write content in a doc file with images preserved Pin
inzibharti7-Jan-09 21:22
inzibharti7-Jan-09 21:22 
GeneralRe: Read pdf file and write content in a doc file with images preserved Pin
Wendelius7-Jan-09 21:47
mentorWendelius7-Jan-09 21:47 
GeneralRe: Read pdf file and write content in a doc file with images preserved Pin
inzibharti7-Jan-09 22:26
inzibharti7-Jan-09 22:26 
GeneralRe: Read pdf file and write content in a doc file with images preserved Pin
Wendelius7-Jan-09 22:30
mentorWendelius7-Jan-09 22:30 
QuestionLockless Queue in C# slower than Locked Queue in C# Pin
Cyrilix6-Jan-09 20:52
Cyrilix6-Jan-09 20:52 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Luc Pattyn6-Jan-09 22:58
sitebuilderLuc Pattyn6-Jan-09 22:58 
Hi,

my best guess would be your test code is too simple: if all the test does is adding and removing queue entries, without any real calculations in between, then most CPU cycles are spent in the spin-loop inside Interlocked. IMO Interlocked is intended to and will work fine when contentions are rare, not when you create them all the time; under light contention conditions, I expect it to work more efficient than any other synchronization scheme.

To confirm this, you should try and come up with a test where extra CPU cycles are required to process the nodes; I would recommend adding something until you see the number of queue/dequeue operations go down by at least 80%, then for that computational load compare again the two schemes.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Love, happiness and fewer bugs for 2009!


GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Cyrilix6-Jan-09 23:28
Cyrilix6-Jan-09 23:28 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Luc Pattyn6-Jan-09 23:36
sitebuilderLuc Pattyn6-Jan-09 23:36 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Cyrilix7-Jan-09 1:18
Cyrilix7-Jan-09 1:18 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Luc Pattyn7-Jan-09 1:58
sitebuilderLuc Pattyn7-Jan-09 1:58 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Daniel Grunwald7-Jan-09 2:37
Daniel Grunwald7-Jan-09 2:37 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Cyrilix7-Jan-09 9:02
Cyrilix7-Jan-09 9:02 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
ben.Kloosterman2-Feb-10 19:53
ben.Kloosterman2-Feb-10 19:53 
GeneralRe: Lockless Queue in C# slower than Locked Queue in C# Pin
Cyrilix3-Feb-10 7:40
Cyrilix3-Feb-10 7:40 
Questionconverting c header file in c# Pin
lawrenceinba6-Jan-09 20:31
lawrenceinba6-Jan-09 20:31 
AnswerRe: converting c header file in c# Pin
N a v a n e e t h6-Jan-09 20:48
N a v a n e e t h6-Jan-09 20:48 
AnswerRe: converting c header file in c# Pin
Guffa6-Jan-09 20:52
Guffa6-Jan-09 20:52 
GeneralRe: converting c header file in c# Pin
lawrenceinba6-Jan-09 20:59
lawrenceinba6-Jan-09 20:59 
GeneralRe: converting c header file in c# Pin
N a v a n e e t h6-Jan-09 21:14
N a v a n e e t h6-Jan-09 21:14 
GeneralRe: converting c header file in c# Pin
lawrenceinba6-Jan-09 21:19
lawrenceinba6-Jan-09 21:19 
GeneralRe: converting c header file in c# Pin
Dragonfly_Lee6-Jan-09 22:24
Dragonfly_Lee6-Jan-09 22:24 
GeneralRe: converting c header file in c# Pin
lawrenceinba6-Jan-09 22:35
lawrenceinba6-Jan-09 22:35 
GeneralRe: converting c header file in c# Pin
Dragonfly_Lee6-Jan-09 22:46
Dragonfly_Lee6-Jan-09 22:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.