Here's my early experiment of running Fortress Hello world program, which is listed below (taken from the tutorial at MIT by the Fortress team):
component hello
export Executable
run() = println("Hello, World !")
end
I'm a bit surprised that its compilation time is "really" slow. I may be guessing that it's caused by type inference in the Fortress compiler. JVM 1.6.0_12 was used in the experiment. One of my quick conclusion is that Fortress is not suitable for scripting. But I think its compiled program will not be slow (as I mentioned that I am suspecting its type inference engine that makes scripting slow).
Here's 5 times of running:
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.393s
user 0m0.244s
sys 0m0.199s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.486s
user 0m0.181s
sys 0m0.214s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.412s
user 0m0.213s
sys 0m0.215s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.377s
user 0m0.197s
sys 0m0.198s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.432s
user 0m0.229s
sys 0m0.198s
component hello
export Executable
run() = println("Hello, World !")
end
I'm a bit surprised that its compilation time is "really" slow. I may be guessing that it's caused by type inference in the Fortress compiler. JVM 1.6.0_12 was used in the experiment. One of my quick conclusion is that Fortress is not suitable for scripting. But I think its compiled program will not be slow (as I mentioned that I am suspecting its type inference engine that makes scripting slow).
Here's 5 times of running:
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.393s
user 0m0.244s
sys 0m0.199s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.486s
user 0m0.181s
sys 0m0.214s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.412s
user 0m0.213s
sys 0m0.215s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.377s
user 0m0.197s
sys 0m0.198s
chanwit@lb /cygdrive/c/fortress/fortress_3625
$ time `bin/fortress chanwit/hello.fss`
bash: Hello,: command not found
real 0m11.432s
user 0m0.229s
sys 0m0.198s
2 comments:
I doubt it -- there's absolutely nothing for a type inferencing engine to do, because there aren't any variables.
There's more likely a much less interesting explanation, such as that it's just the time to load a huge compiler into memory or other similar system machinery.
BTW, pardon the comments of a total stranger who knows nothing about your blog or what you're trying to accomplish. Your post just popped up under my Google alert for "type inference."
You are using the cygwin version of time: you have to use "time ./hello" not "time hello"
Post a Comment