flat assembler
Message board for the users of flat assembler.
Index
> Main > Do you use BCDs? |
Do you use BCDs? | |||||||||||||||||||||
|
|||||||||||||||||||||
Total Votes : 9 |
Author |
|
Ciper 05 Jan 2013, 18:44
Just curious...
_________________ Ciper |
|||
05 Jan 2013, 18:44 |
|
HaHaAnonymous 05 Jan 2013, 19:27
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:05; edited 1 time in total |
|||
05 Jan 2013, 19:27 |
|
Ciper 05 Jan 2013, 20:22
baldr,
Thank you very much for these clarifications; I believe people and (more seriously) compilers have discarded them too soon; most run-time libraries are certainly slower than these instructions. _________________ Ciper |
|||
05 Jan 2013, 20:22 |
|
baldr 05 Jan 2013, 20:37
Ciper,
Those aren't clarifications of any sort, I'd just pointed out that data usage dictates its representation. For computation-heavy usage, binary can be optimal; if you intend to convert them to textual (or any other) representation often, BCD (or any other easily converted to ASCII/other) representation can give your program sensible boost. Those instructions are invalid in 64-bit code anyway (except fbstp, naturally ). |
|||
05 Jan 2013, 20:37 |
|
Ciper 05 Jan 2013, 20:45
baldr,
Retracting the 'clarifications' qualification... _________________ Ciper |
|||
05 Jan 2013, 20:45 |
|
cod3b453 06 Jan 2013, 02:19
Never found a suitable time to use it until recently when comparing lots of ASCII decimal output, switching to hex diff saved some space and time.
|
|||
06 Jan 2013, 02:19 |
|
baldr 06 Jan 2013, 04:47
cod3b453,
Comparison is probably not a good example of decimal-oriented data representation usage. Exach matching of arbitary strings can be processed (with good hash function) efficiently; most scripting languages use that technique to compare strings in almost O(1) time. |
|||
06 Jan 2013, 04:47 |
|
pool 06 Jan 2013, 11:32
..
Last edited by pool on 17 Mar 2013, 12:20; edited 1 time in total |
|||
06 Jan 2013, 11:32 |
|
cod3b453 06 Jan 2013, 12:22
@baldr: My example wasn't about the comparison as much as the space usage - moving from (n+2) ASCII digits to n BCD digits simply meant 2-3 times less data to be stored/loaded from disk; hence faster to compare and less of a dent in my disk quota
|
|||
06 Jan 2013, 12:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.