Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Native 64-bit  (Read 1135 times)

madman

  • Bay Watcher
    • View Profile
Native 64-bit
« on: February 09, 2010, 06:27:40 pm »

How difficult would it be to compile Dwarf Fortress natively for 64-bit Linux, rather than us 64-bit users having to use 32-bit emulation? (and maybe Windows has similar arguments, but I don't know the details for that).

Pros:
* About 10-30% faster (depending on what benchmarks you believe).
* Easier to get to run on 64-bit environment.
* No need to 64-bit Linux users to maintain a 32-bit emulation environment.

Cons:
* More targets to support and test.
* Only benefits a small proportion of users (although this proportion will increase to eventually become nearly everyone).
* Today would need to have access to a 64-bit environment for compiling.
* Slightly higher memory use (I don't think this is a big problem).

It also depends on how the code is written - if pointers are frequently coerced into ints, or other assumptions made about pointer sizes, this may be intractable and never happen, otherwise it may be just a recompile away.
Logged
Quote from: bluea
Compilers are Dwarves with the beards abstracted away.
They can pull completely amazing maneuvers, yet manage to die of thirst in the river.

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: Native 64-bit
« Reply #1 on: February 10, 2010, 05:24:22 pm »

Sometimes it's not as simple as you think, depending on how the underlying framework is setup.
Directly recompile most 32-bit program to 64-bit will tend to double the binary thou.
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

madman

  • Bay Watcher
    • View Profile
Re: Native 64-bit
« Reply #2 on: February 10, 2010, 11:10:33 pm »

Binary size is not usually an issue. 64-bit also increases the RAM usage for the data, which can be an issue, but I think Dwarf Fortress is processor bound not memory bound, and 64-bit code is usually faster.

I have no idea how simple it is. That depends on how the Dwarf Fortress code and any included libraries are written, and on the build environment. Best case is list a recompile, worst case is a rewrite.

It also depends on Toady choosing to do it, which is why I put it in as a suggestion (in case it turns out to be really easy). No-one else seems to have suggested it.
Logged
Quote from: bluea
Compilers are Dwarves with the beards abstracted away.
They can pull completely amazing maneuvers, yet manage to die of thirst in the river.

CaptApollo12

  • Bay Watcher
    • View Profile
Re: Native 64-bit
« Reply #3 on: February 11, 2010, 01:35:34 am »

goddam windows seven AND 64 bit processer not allowing me to play my favorite old games. I was greatly impressed that df runs when I got my computer for christmas.
Logged
"MONTARON!  You are so AGGRAVATING!   'Tis disturbing to my demeanor..."

SirHoneyBadger

  • Bay Watcher
  • Beware those who would keep knowledge from you.
    • View Profile
Re: Native 64-bit
« Reply #4 on: February 16, 2010, 04:26:27 am »

I'm with you, CaptApollo12. I first of all spent twice what I wanted to spend on an operating system to get Win 7 ultimate, so I could have encryption and XP mode, and then I ended up having to download DOSbox just to play MoM and Dark Sun.

I haven't even gotten around to booting up Planescape Torment yet (here's to hoping my discs still work), so who knows what kind of headache that will be?
Logged
For they would be your masters.