Giter Site home page Giter Site logo

Comments (11)

archbirdplus avatar archbirdplus commented on September 26, 2024

We can compile performance critical files separately, right?

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 26, 2024

No, not in an easy way. We can disable safety checks in performance critical functions with @setRuntimeSafety(false) though.
Also I should probably check if the performance impact even is that big.

from cubyz.

archbirdplus avatar archbirdplus commented on September 26, 2024

See also:

@setFloatMode(comptime mode: FloatMode) void
Changes the current scope's rules about how floating point operations are defined.
This is equivalent to -ffast-math in GCC```
Is this the only way to enable fast math?

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 26, 2024

I just compared the two release mode and loading a render distance 12 world goes from 33.5 s to 40 s, so a 20% increase in runtime.
Overall I'd say it's not too bad for the potential benefit it gets us. I would need to fix #410 first though.

from cubyz.

archbirdplus avatar archbirdplus commented on September 26, 2024

Can you profile with fast math and stuff?
Also, how do you profile Cubyz? I used this, but it feels like a hack.

if(self.size == 0) {
    if(main.game.world != null and main.game.world.?.gameTime.load(.monotonic) > 0)
        main.Window.c.glfwSetWindowShouldClose(main.Window.window,main.Window.c.GLFW_TRUE);
}

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 26, 2024

Also, how do you profile Cubyz?

In this case, I just used the timer of my phone xD

from cubyz.

archbirdplus avatar archbirdplus commented on September 26, 2024

Not sound :(
My hack is better. You can do time ./zig-out/bin/Cubyzig.

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 26, 2024

time is actually worse at measuring this, because it also measures the time that is spent in the menu.

from cubyz.

archbirdplus avatar archbirdplus commented on September 26, 2024

Don't you have developerAutoEnterWorld for a reason?

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 26, 2024

Right, I guess I could use that as well, still, apart from being more precise, it wouldn't actually be much different from using my phone.

from cubyz.

archbirdplus avatar archbirdplus commented on September 26, 2024

Good to know performance is in good hands. I could get time within ±0.1s out of 8.9 (lods=3).

from cubyz.

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.