Coder Social home page Coder Social logo

Switch to `nalgebra` everywhere about hotham HOT 4 CLOSED

leetvr avatar leetvr commented on May 18, 2024
Switch to `nalgebra` everywhere

from hotham.

Comments (4)

Ralith avatar Ralith commented on May 18, 2024

If you want physics, you'll probably use rapier, which means you'll have nalgebra in your dependency tree regardless. It's very powerful but some people find the verbose/obscure type errors from the highly generic stuff offputting, and you might get better compile times if you touch it as little as possible. On the whole I like it, personally.

from hotham.

kanerogers avatar kanerogers commented on May 18, 2024

If you want physics, you'll probably use rapier, which means you'll have nalgebra in your dependency tree regardless. It's very powerful but some people find the verbose/obscure type errors from the highly generic stuff offputting, and you might get better compile times if you touch it as little as possible. On the whole I like it, personally.

Good point re: rapier. We're already using it and I'm having to do conversions between cgmath and nalgebra in places anyway which is a bit gross. I have to admit I'd prefer something a bit less generic, but there's (probably) a bigger performance penalty switching around between libraries than just sticking with nalgebra.

from hotham.

Ralith avatar Ralith commented on May 18, 2024

there's (probably) a bigger performance penalty switching around between libraries than just sticking with nalgebra.

I'm actually skeptical of that. The layouts are identical, so LLVM will see that it's a simple memcpy, and it'll bake down to no different than a regular Copy. Might matter if it prevents you from passing matrices by reference in a major way, but otherwise it's probably insignificant. Of course, the cognitive overhead of switching between them all the time is its own thing.

from hotham.

kanerogers avatar kanerogers commented on May 18, 2024

from hotham.

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.