Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Stefanos A.
2011/11/20 Jonathan Shore jonathan.sh...@gmail.com Slide, not really. If mono SIMD had a more general mapping to the GPU, or could operate on very large vectors or matrices, possibly. Linear algebra is an easy mapping to that stuff. However, I do more complicated stuff around timeseries,

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Jonathan Shore
Did the code I attached get filtered? I'll post the tar.gz into bugzilla and send the link. Below are code snippets to calculate Ordinary Least Squares, a simpler example. I found this to be 4x slower than C++ / Java: Here is the safe and unsafe versions of OLS which I ran on an array size

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Jonathan Shore
Here is a link to and entry in bugzilla with attached code. I could not send to the list: http://bugzilla.xamarin.com/show_bug.cgi?id=2098 On Nov 20, 2011, at 7:41 AM, Jonathan Shore wrote: Did the code I attached get filtered? I'll post the tar.gz into bugzilla and send the link.

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Konrad M.
Hi, I'd like to add that you may gain something on MS JIT compiler using for (int i = 0 ; i x.Length ; i++) instead of for (int i = 0 ; i len ; i++) This may seem counter intuitive, however that's the scenario in which JIT eliminates array bound checking for the x array (however not for the

[Mono-dev] building mono with llvm support from git repositories (missing llvm header?)

2011-11-20 Thread Jonathan Shore
Hi, I have pulled the repositories: - http://github.com/mono/llvm.git - http://github.com/mono/ And am on the mono-2.10 branch of the mono git repo and the mono branch of the llvm git repo. The build proceeded smoothly until attempting to build the LLVM backend mapping in mono/mini:

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Konrad M.
Hi again, It is too bad that one cannot declare a primitive expression to be locally const in C#. Maybe one could get away with something like this: public struct FinalBoxT { public FinalBox(T value) { this.value = value; } public T

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Jonathan Shore
Yes, I see what you are doing. There is no way to modify the structure. However doesn't it still boil down to determining whether a local variable reference is changed. So for instance: FinalBoxint len = some expression for (int i = 0 ; i len ; i++) do something on array[i] vs var

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Konrad M.
On Sun, 2011-11-20 at 12:33 -0500, Jonathan Shore wrote: Yes, I see what you are doing. There is no way to modify the structure. However doesn't it still boil down to determining whether a local variable reference is changed. Yeah, exactly, this is rather pointless construct ;) There

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Konrad M.
On the other hand, maybe it could be possible to add the final-like mechanism to Mono's compiler. Such mechanism would be beneficial if the CLR had some notion of local readonly variables. F# uses non-mutable variables a lot, so maybe CLR recognizes it. I am not sure what kind of transparent

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Dawid Weiss
As far as I know the final on local variables is only a hint for the java compiler (javac), not jit (hotspot) engine. Detection of loop invariants is done at runtime (during code jitting) so there's really no difference between any of the following in modern Java jits: 1) (final) int max =

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Jonathan Shore
Yes, the modern java JIT does not need final as does the analysis. However, it is very nice to be able to specify constness, not only to help the JIT along, but also in terms of documenting intent. Given that C# does not have such a construct (too bad) / const is too constrained, the next

Re: [Mono-dev] building mono with llvm support from git repositories (missing llvm header?)

2011-11-20 Thread Zoltan Varga
Hi, You should use the 'mono-2-10' branch of the llvm repo. Zoltan On Sun, Nov 20, 2011 at 5:48 PM, Jonathan Shore jonathan.sh...@gmail.comwrote: Hi, I have pulled the repositories: - http://github.com/mono/llvm.git - http://github.com/mono/ And am on the

Re: [Mono-dev] building mono with llvm support from git repositories (missing llvm header?)

2011-11-20 Thread Jonathan Shore
Thanks!Out of curiosity, is what is on the head for mono/llvm mono/mono stable and intended for 2.10.7? On Nov 20, 2011, at 2:04 PM, Zoltan Varga wrote: Hi, You should use the 'mono-2-10' branch of the llvm repo. Zoltan On Sun, Nov 20, 2011 at 5:48 PM,

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Konrad M.
On Sun, 2011-11-20 at 19:39 +0100, Dawid Weiss wrote: As far as I know the final on local variables is only a hint for the java compiler (javac), not jit (hotspot) engine. Detection of loop invariants is done at runtime (during code jitting) so there's really no difference between any of

Re: [Mono-dev] building mono with llvm support from git repositories (missing llvm header?)

2011-11-20 Thread Zoltan Varga
Hi, What is on the mono-2-10 branch is intented for the next 2.10 release, whats is master is intented for mono 2.12. Zoltan On Sun, Nov 20, 2011 at 8:24 PM, Jonathan Shore jonathan.sh...@gmail.comwrote: Thanks!Out of curiosity, is what is on the head for mono/llvm

Re: [Mono-dev] mono numerical performance

2011-11-20 Thread Jonathan Shore
On Nov 20, 2011, at 2:28 PM, Konrad M. KruczyƄski wrote: Maybe that's the reason there is no local readonly in the C# language - local variables are easily trackable. As to those used in closures (as mentioned by Jonathan) - as far as I know, they aren't local variables actually but rather

Re: [Mono-dev] Hi, I'm new here.

2011-11-20 Thread Stifu
Mono is a framework, which includes compiler and runtime. It's a reimplementation of the .NET framework. How you use it depends on your goals. DeltaAccel wrote: So, what's mono? Is it a compiler or a bunch of DLL I can attach to Visual C#? I'm new at this :P -- View this message in

Re: [Mono-dev] Hi, I'm new here.

2011-11-20 Thread Revan
Mono is mostly used in two ways: 1- Embedding c# code and using c# as a script language. There are a few games that did this and the number will increase in time since c# is much more suitable for scripting than python or lua. 2- Running c# codes in non-windows platforms. On 21.11.2011 00:57,

Re: [Mono-dev] Hi, I'm new here.

2011-11-20 Thread gelin yan
Hi all I am curious the first scenario: embedding c# code and use it as a scripting language. As regards the size of runtime, it usually bigger than others like lua or even python, so what is the advantage? Regards gelin yan On Mon, Nov 21, 2011 at 7:02 AM, Revan