Skip to content

LiarPrincess/Violet-BigInt-XsProMax

Repository files navigation

BigInt implementation from Violet - Python VM written in Swift with following changes:

  • no small inlined integer (Smi) - magnitude is always stored on the heap
  • no restrictions on the size - isNegative is stored in-line (and not on the heap like in Violet); count and capacity are on the heap because I don't want to stray too much from Violet.

Which gives us:

struct BigInt {
  struct Header {
    var count: UInt32
    var capacity: UInt32
  }

  var flags: UInt8
  var buffer: ManagedBufferPointer<Header, UInt>
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages