Skip to content

0.0.1

Latest
Compare
Choose a tag to compare
@tornikegomareli tornikegomareli released this 25 Jun 09:35
· 3 commits to main since this release
685122a

Release Notes - Swift Memoize Macro v0.0.1

Features

  • @memoize Macro: Easily add memoization to any function with a simple attribute.
  • Automatic Cache Generation: Creates a private cache for each memoized function.
  • Support for Various Function Types: Works with functions of different parameter counts and return types.
  • Prefix Naming Convention: Automatically generates memoized versions of functions with a "memoized" prefix.

Compatibility

  • Requires Swift 5.9 or later
  • Compatible with Xcode 15+

Usage

Simply add the @Memoize attribute before your function declaration:

@Memoize
func expensiveCalculation(a: Int, b: Int) -> Int {
    // Your function implementation
}