SPVM Document

SPVM is a Programming launguage which has Perl-like syntax. You can install SPMV from CPAN. Linux/UNIX, Mac, Windows is supported.

cpan SPVM

or

cpanm SPVM

Perl-like source code is converted to C shared library. This example is numeric array operation.

package MyMath : precompile {
  sub sum : int ($nums : int[]) {
    
    my $total = 0;
    for (my $i = 0; $i < @$nums; $i++) {
      $total += $nums->[$i];
    }
    
    return $total;
  }
}

You can call this SPVM subroutine from Perl easily. Note that "~/.spvm_build" directory is needed.

use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/lib";

use SPVM 'MyMath';

# Call subroutine
my $total = MyMath->sum([3, 6, 8, 9]);

print "Total: $total\n";

Try the SPVM Benchmark once. The result is amazing.

SPVM also has utilities to bind C/C++/Cuda functions for even faster peformance. See also Native API.

SPVM Tutorial

SPVM Language Specification

You can see SPVM Language Specification.

SPVM Native API

You can see SPVM Language Specification.

SPVM Performance Benchmark

SPVM Exchange API