Skip to content

Performance: Extend short_big_int to int64_t #1500

Closed as not planned
Closed as not planned

Activity

  1. saghul commented on May 20, 2026

    @saghul
    Contributor

    IIRC that was a conscious decision to simplify the implementation.

  2. CarterLi commented on May 20, 2026

    @CarterLi
    ContributorAuthor

    IMO 64-bit short_big_int is very useful when exposing (u)int64_t variables in C to javascript

    quickjs-ng using int32_t only results in lower performance than the original project. doesn't it?

  3. saghul commented on May 20, 2026

    @saghul
    Contributor

    Likely yes, in microbenchmarks.

    Do you have a real world use case that gets heavily impacted? We need to see some numbers.

  4. CarterLi commented on May 21, 2026

    @CarterLi
    ContributorAuthor

    No. As I said before, I'm still experimenting quickjs-ng and trying to integrate it to my project.

    I'm finding this when investigating a compiler warning:

    /opt/homebrew/include/quickjs.h:380:25: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
      380 |     v.u.short_big_int = d;
          |                       ~ ^
    

    I immediately realized that it can be improved for performance.

  5. saghul commented on May 21, 2026

    @saghul
    Contributor

    What compilation flags are you using? I'm not getting that warning on macOS.

    PS: There are a lot of shuch warnings on Windows, alas.

  6. saghul commented on May 21, 2026

    @saghul
    Contributor

    Fix for the compilation warning: #1503

  7. bnoordhuis commented on Aug 11, 2026

    @bnoordhuis
    Contributor

    I'll make the judgement call that we're not making changes until it's clear it's really needed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions