Click here to Skip to main content
15,921,463 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: converting c header file in c# Pin
Rob Philpott6-Jan-09 23:00
Rob Philpott6-Jan-09 23:00 
GeneralRe: converting c header file in c# Pin
Luc Pattyn6-Jan-09 23:11
sitebuilderLuc Pattyn6-Jan-09 23:11 
GeneralRe: converting c header file in c# Pin
lawrenceinba6-Jan-09 23:27
lawrenceinba6-Jan-09 23:27 
QuestionFast string to integer conversion Pin
HosamAly6-Jan-09 19:58
HosamAly6-Jan-09 19:58 
AnswerRe: Fast string to integer conversion Pin
N a v a n e e t h6-Jan-09 21:10
N a v a n e e t h6-Jan-09 21:10 
GeneralRe: Fast string to integer conversion Pin
HosamAly6-Jan-09 22:29
HosamAly6-Jan-09 22:29 
GeneralRe: Fast string to integer conversion Pin
J4amieC6-Jan-09 23:08
J4amieC6-Jan-09 23:08 
GeneralRe: Fast string to integer conversion Pin
HosamAly6-Jan-09 23:15
HosamAly6-Jan-09 23:15 
GeneralRe: Fast string to integer conversion Pin
J4amieC6-Jan-09 23:54
J4amieC6-Jan-09 23:54 
Ok, I see.

The performance issue with Int32.Parse is because, like alot of things in the framework, it tries to cater for every man's needs and therefore includes the ability, and logic (therefore overhead) to parse lots of different types of string (eg, currency, hex etc).

If you are satisfied that you are only receiving decimal-formatted numbers, without any other markup (such as separators) you could look at Int32.Parse in reflector and follow the trail to the unmanaged code that does the actual parsing - this will lead you into an internal class called Number which has an unsafe method ParseNumber that does the bulk of the work. Your job would be to identify the bit that parses a decimal-formatted number and just extract that portion into your own library.
AnswerRe: Fast string to integer conversion Pin
Dragonfly_Lee6-Jan-09 22:14
Dragonfly_Lee6-Jan-09 22:14 
GeneralRe: Fast string to integer conversion Pin
HosamAly6-Jan-09 22:27
HosamAly6-Jan-09 22:27 
GeneralRe: Fast string to integer conversion Pin
Dragonfly_Lee6-Jan-09 22:42
Dragonfly_Lee6-Jan-09 22:42 
AnswerRe: Fast string to integer conversion Pin
Guffa6-Jan-09 23:49
Guffa6-Jan-09 23:49 
GeneralRe: Fast string to integer conversion Pin
N a v a n e e t h7-Jan-09 0:04
N a v a n e e t h7-Jan-09 0:04 
GeneralRe: Fast string to integer conversion Pin
Le centriste7-Jan-09 1:13
Le centriste7-Jan-09 1:13 

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.