Hello Ben,
 
First I don't known anything specific to the status of unsafe in mono (never tried it with mono). But if (or when) it's supported I don't anticipate any problem using it within corlib (which is where the BigInteger will be most used) because corlib will only be used with the mono runtime (so it's simple).
 
However using unsafe code will make the class less (must do some reading to quantify "less") useful for other uses [*] because the application using the assembly/class will be required to "acknowledge" to use  of unsafe code - and this, IMHO, is bad for reusing (my main focus ;-).
 
[*] Example: including BigInteger in Mono.Security to implement DH for SSL.
 
The speed gain seems important for the specific methods but I'm unsure how it's translate in a real application. Is it still worth it ?
If yes maybe the unsafe code could be #if/#endif depending on where it will be used (like corlib or other assemblies).
 
Sebastien Pouliot
Security Architect, Motus Technologies, http://www.motus.com/
work: [EMAIL PROTECTED]
home: [EMAIL PROTECTED]
----- Original Message -----
From: Ben Maurer
Sent: Sunday, February 09, 2003 10:57 AM
Subject: [Mono-list] Status of unsafe code in Mono

Hi,

 

I am working on improving/rewriting Mono.Math.BigInteger, a class that is essential for asymmetrical crypto. My main focus is speed. I have found that using unsafe code can give a 20% - 50% speed boost in a couple of functions.

 

I was wondering how well unsafe code is implemented in mono. Is it to the point where production code can use it?

 

Sincerely,
Ben Maurer

Reply via email to