GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Sergey Shandar (functionalscript@techhub.social)'s status on Tuesday, 26-Nov-2024 08:41:33 JSTSergey ShandarSergey Shandar

    Does anyone know how to make a fast `floor_log2` function for `bigint` in JavaScript? I know that JavScript VM can do it in almost `O(1)` because it has information about a size of `bigint`. My current best algorithm is `O(log(n))` where `n` is the size of the `bigint`. The algorithm performs faster than `x.toString(2).length` and consumes less memory. Any idea for the improvement? https://github.com/functionalscript/functionalscript/blob/a9a1cd2c1b0f4c025faf2223eb6ff96f48e8374b/types/bigint/module.f.cjs#L65

    #JavaScript #bigint #log2 #Algorithm

    In conversationabout 8 months ago from techhub.socialpermalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: repository-images.githubusercontent.com
      functionalscript/types/bigint/module.f.cjs at a9a1cd2c1b0f4c025faf2223eb6ff96f48e8374b · functionalscript/functionalscript
      FunctionalScript is a purely functional subset of JavaScript - functionalscript/functionalscript
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.