flat assembler
Message board for the users of flat assembler.
Index
> Main > fastest way of parsing strings? |
Author |
|
r22 16 Jul 2007, 22:50
reading by chunks is preferred.
The only problem is you need to make sure that your allocated string buffer has enough padding at the end. Say you have a string "ABC" stored in a 3 byte long block of memory, IF you are reading 4 bytes at a time you're going to go outside of the buffer. I optimized C library would work just fine for you, no sense in reinventing the wheel. I recall a few threads on this forum about an optimized StrLen function, but I'm not sure about a fully optimized String parsing library with unicode support. |
|||
16 Jul 2007, 22:50 |
|
vid 17 Jul 2007, 00:22
SomeoneNew: there are sooo many things to take into account. One major problem is whether string is static and dynamic. Static strings CAN be faster (often aren't in practice because of implementation), but they are way harder to use and have limited size. Dynamic strings are easy to use, not limited, but generally slower when enlarging. Note that nothing i mentioned here is nescessary, and in both cases it can be circumvented, problem is just it usually isn't.
So the question i would really care about is: Is the string handling bottleneck of my application? Quote: but I'm not sure about a fully optimized String parsing library with unicode support. For unicode support try ICU. Of course, the more complete unicode support you want, more HUNDREDS OF KILOBYTES are wasted. |
|||
17 Jul 2007, 00:22 |
|
SomeoneNew 17 Jul 2007, 22:28
hi thanks
yes vid, it is a bottleneck. since i parse comma delimited text files and html! _________________ Im new, sorry if I bothered with any stupid question |
|||
17 Jul 2007, 22:28 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.