Email or username:

Password:

Forgot your password?
Capital

The performance of Modal was being discussed by me, @wryl, and @neauoire.

After some profiling from Wryl, Devine managed to find a massive optimization for Modal. Actually in sane how fast it is now.

(The profiling also revealed that the C implementation of Modal has 0 cache misses)

5 comments
Capital

I had a hunch that Modal would have 0 cache misses. It's memory is completely static. Modal's file size is so small even CPUs 20 years ago could hold the whole program in L1 or L2 cache.

gustav

@capital 😮 I need to check how the matching is done

(wryl)

@capital @neauoire It's possible to reduce this even further. I hypothesize rewrite cycles on the order of 100ns on average.

Given that the entire rewrite loop has a timing range in the microseconds, that puts the C implementation of #modal on par with Python and other bytecode VMs with optimized dispatch.

Rewriting is a powerful paradigm. This language can be pushed even further and further.

And we're not even close to the limit.

Marce Coll

@capital @wryl @neauoire its so interesting @neauoire came up with Modal recently as I was also investigating a rewrite language in Common Lisp, will check the implementation for sure. I wanted to see what a language with a construct even more powerful than CL macros looks like, may play with it today

Capital

@dziban Modal was originally by @wryl written in Python. Devine wrote the C implementation.

Go Up