Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Challenge: fastest program wins

Name: Anonymous 2009-04-14 12:59

Write a program in your language that
1.opens a file as arbitrary precision integer.
2.divides the number by 3.
3.stores the binary result in another file.

Name: Anonymous 2009-04-18 13:59

anyone that talks about problem domains is a faggot

Name: Anonymous 2009-04-18 14:08

>>79
Your indention makes my eyes bleed.

Name: 82 2009-04-18 14:10

(rand
  (
  ),stdout

Shit, I read it again more carefully and I got trolled.

Name: Anonymous 2009-04-18 14:23

>>83
);}

Name: Anonymous 2009-04-19 7:53

>>78
Back to your desk, enterprise codemonkey.

Name: Anonymous 2009-04-20 18:28

What sort of fucking idiot regards "opens a file as arbitrary precision integer" to mean "read in a file, interpret it as ASCII and take that string to be a base 10 number"? Obviously, it means take the actual file data to be a number.

Name: Anonymous 2009-04-20 18:37

>>76
Interesting method of dividing by three, but it makes little difference as the bottleneck is disk access.

Name: Anonymous 2009-04-20 18:44

>>86
Obviously, it means take the actual file data to be a number.
`Obvious' is probably not the word you're looking for here considering every single program in this thread does it the other way.

Given >>1's definition, how would you interpret a binary file as an arbitrary-precision integer?

Name: Anonymous 2009-04-20 18:46

>>88
No, every single program in this thread does not.

The two programs in this thread which actually do it properly and efficiently interpret >>1 to mean the file is read in as a binary number with the most significant bit at the start of the file and the least significant bit at the end.

Name: Anonymous 2009-04-20 18:49

>>89
I think you need to re-examine your assumptions.

Name: Anonymous 2009-04-20 18:51

>>90
I will, along with my job.

Name: Anonymous 2009-04-20 18:52

>>91
Reading SICP improves job performance.

Name: Anonymous 2009-04-20 19:40

>>76 is full of bugs and doesn't even compile properly.

Name: Anonymous 2009-04-20 21:31

>>93 is full of anticudders and doesn't even BBCODE properly

Name: Anonymous 2009-04-21 1:12

_div3:    ; void *to, void *from, uint qwords
    mov rcx,rdx
    xor rdx,rdx
    mov r8,3
    lea rsi,[rsi+8*rcx]
    lea rdi,[rdi+8*rcx]
    neg rcx
.iter:
    mov rax,[rsi+8*rcx]
    div r8
    mov [rdi+8*rcx],rax
    add rcx,1
    jnz .iter
    ret


…snip 100 lines of open+mmap…

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List