[Swift-devel] karajan compiler

Ian Foster foster at mcs.anl.gov
Sun Jun 8 19:10:17 CDT 2008


Mihael:

Cool. Have you also looked at whether you could use some existing  
functional language compiler? We have real experts right here on  
campus--could be well worth talking to them.

Ian.


On Jun 7, 2008, at 6:21 PM, Mihael Hategan wrote:

> In the past week I've been playing a little with trying to see how
> viable such an idea would be. It seems like it is.
>
> The difficulty was in keeping lightweight threading in. This seems  
> to be
> doable pretty efficiently with a fair amount of switch statements.
> Though trying it on real things would probably reveal the need for  
> some
> adjustments.
>
> I also wanted to have proper lexical scoping, in the style of ML. That
> also seems to be working fairly well.
>
> The third part was some type system, and it turns out type inference  
> was
> also easy to put in. So the end result is something that is statically
> scoped, but type annotations are optional. In terms of Swift this  
> would
> translate into an easier implementation of the Swift type system,  
> which
> is currently quite contrived.
>
> Speeds seem to be in the range of about 1.5 orders of magnitude faster
> (50x) (mostly due to the fact that context switches happen in a more
> regular fashion).
>
> I'll be committing the code in a separate module in cog at some  
> point in
> the future, so that others can play with it (though I suspect others
> means Ben), even if it may never see more development. It's, of  
> course,
> missing a lot of things.
>
> Mihael
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel




More information about the Swift-devel mailing list