Git Product home page Git Product logo

Comments (7)

Luiji avatar Luiji commented on July 24, 2024

Perhaps at some point in it's evolution it was written to disk, or at least was going to be. It'd be use std::map/std::unordered_map/etc. That raises my next question: should we rely purely on std::map or on std::unordered_map, should we use an external hash map library like Google SparseHash, or perhaps we should use std::unordered_map when detected by configure but use something like SparseHash when it's not available?

from tsc.

Quintus avatar Quintus commented on July 24, 2024

std::unordered_map is an interesting option — I’ve not yet looked detailed on C++11, but it seems very good for this purpose. Regarding SparseHash, I think we should rely on the standard library as much as viable, because that minimizes our external dependency list, which is already quite large. As C++11 is not that new anymore (3 years!) I guess that with the next Ubuntu LTS release most current mayor Linux distributions should have a C++11-capable compiler. It should be no problem to rely on its features.

Vale,
Quintus

from tsc.

Luiji avatar Luiji commented on July 24, 2024

If we want to support earlier versions of gcc we can use std::tr1::unordered_map, which was defined in C++ Technical Report 1 (2005-2007). It's just a draft but a number of vendors opted to support it early.

It shouldn't be hard to add a little configure check to see whether std::unordered_map or std::tr1::unordered_map is available and fall back to std::map in the worst case scenario.

The only platform I'd worry about being way behind in terms of GCC would be RHEL/CentOS. I've had so many problems with those platforms because of old GCCs.

from tsc.

Quintus avatar Quintus commented on July 24, 2024

It shouldn't be hard to add a little configure check

Yes, that should be relatively easy. I think we should go that route.

The only platform I'd worry about being way behind in terms of GCC would be RHEL/CentOS

Ahem. I highly doubt RHEL/CentOS maintainers want to immediately ship SMC 2.0.0. When they decide to do so in five or ten years, they will most likely also ship a newer GCC that supports C++11. I’m not willing to make workarounds in SMC’s code for these distributions, which are usually not meant to be used as game computers anyway, but targetted at either server or office use.

Vale,
Quintus

from tsc.

Quintus avatar Quintus commented on July 24, 2024

Btw. when we decide to go C++11, we can probably replace boost::thread with the C++11 thread library. Just a thought...

from tsc.

Luiji avatar Luiji commented on July 24, 2024

Gotta love dependency squashing. ;)

from tsc.

Quintus avatar Quintus commented on July 24, 2024

Just for the record, on the MinGW ML they’re currently discussing cross-platform thread alternatives in C and C++. The C++11 std::thread has been mentioned as being the best option so far: http://sourceforge.net/p/mingw/mailman/message/32214718/

Vale,
Quintus

from tsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.