Skip to content

ykjit/yksompp

 
 

Repository files navigation

yksompp

This is an experimental yk-jit-enabled SOM++ interpreter.

Building

First, initialise the core-lib submodule (SOM standard library):

$ git submodule update --init

Yk requires its own modified clang toolchain, supplied via yk-config. Update the yk_config path at the top of justfile to point to your installation.

To build with Yk support:

$ just build-yk        # debug build  → cmake-yk/SOM++
$ just build-yk-release  # release build → cmake-yk/SOM++

To build without Yk (plain SOM++):

$ just build          # release build → cmake-build/SOM++
$ just build-debug    # debug build   → cmake-debug/SOM++

Running

$ just hello-yk       # run Examples/Hello.som under the JIT
$ just test-yk        # run the full SOM test suite under the JIT

To run an Are-We-Fast-Yet benchmark directly:

$ cmake-yk/SOM++ -cp Smalltalk:Examples/AreWeFastYet Examples/AreWeFastYet/Harness.som <Benchmark> <iterations> <inner-iterations>

To compare all AWFY benchmarks plain vs Yk side-by-side:

$ just awfy-compare

yk-related tips

  • Lower the hot-loop threshold so tracing fires quickly:

    YK_HOT_THRESHOLD=5 cmake-yk/SOM++ -cp Smalltalk Examples/Hello.som
    
  • Write tracing statistics to a JSON file:

    YKD_LOG_STATS=ykstats.json cmake-yk/SOM++ -cp Smalltalk:Examples/AreWeFastYet Examples/AreWeFastYet/Harness.som Sieve 5 1
    cat ykstats.json
    

    traces_compiled_ok > 0 and trace_executions > 0 confirm the JIT is working.

  • See doc/Yk/ for a full account of the integration.

About

SOM++ - C++ implementation of the Simple Object Machine Smalltalk

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 56.5%
  • Shell 14.2%
  • Makefile 12.3%
  • C 8.2%
  • Perl 4.0%
  • HTML 2.4%
  • Other 2.4%