SPVM - Static Perl Virtual Machine

Static Perl Virtual Machine. Fast calculation, fast array operation, and easy C/C++ Binding.

Features

Examples

SPVM Module:

  # lib/SPVM/MyMath.spvm
  package SPVM::MyMath {
    sub sum : int ($nums : int[]) {
      
      my $total = 0;
      for (my $i = 0; $i < @$nums; $i++) {
        $total += $nums->[$i];
      }
      
      return $total;
    }
  }

Use SPVM Module from Perl

  use FindBin;
  use lib "$FindBin::Bin/lib";
  
  use SPVM 'SPVM::MyMath';
  
  # Call method
  my $total = SPVM::MyMath->sum([3, 6, 8, 9]);
  
  print $total . "\n";

More imformation

SPVM Document

https://yuki-kimoto.github.io/spvmdoc-public/

SPVM CPAN

https://metacpan.org/pod/SPVM