[Mono-devel-list] plans for a native AES wrapper.
Paolo Molaro
lupus at ximian.com
Fri Jul 22 05:37:21 EDT 2005
On 07/21/05 Allan Hsu wrote:
> I think I may have misread the part of the wiki that talks about
> embedding mono (http://mono-project.com/Embedding_Mono):
Note that this page is specifically about embedding: icalls are
available to embedders, but that's it, they aren't a generally
available solution, so it doesn't make sense to bring them up for speed
when talking about writing a generally useful managed wrapper for
native crypto.
> "The Mono runtime provides two mechanisms to expose C code to the CIL
> universe: internal calls and native C code. Internal calls are
> tightly integrated with the runtime, and have the least overhead, as
> they use the same data types that the runtime uses.
> The other option is to use the Platform Invoke (P/Invoke) to call C
> code from the CIL universe, using the standard P/Invoke mechanisms."
>
> Does that text actually list *three* options, not two? It also seems
> to suggest that internal calls are faster than *something*. I had
The wording is inaccurate. P/Invoke are slower only if you request
marshaling, which is something you don't want to do anyway if you're
concerned with speed. Icalls are faster than equivalent p/invoke
methods only because they can deal with something pinvoke methods
can't do and hence can be considered to take infinite time (that is
icalls can take object references as arguments).
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list