[Mono-devel-list] plans for a native AES wrapper.
Zoltan Varga
vargaz at gmail.com
Thu Jul 21 16:39:58 EDT 2005
Hi,
Internal calls are only a bit faster than p/invoke. The difference
only becomes
greater when complex types are passed to native code like arrays/structures in
which case the runtime will have marshall them. You are of course free to
add new internal calls to your app which embeds the runtime.
Zoltan
> I think I may have misread the part of the wiki that talks about
> embedding mono (http://mono-project.com/Embedding_Mono):
>
> "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
> previously thought that it was comparing native calls to p/invoke.
> Was I wrong?
>
> We've written both a p/invoke and an internal call Rijndael wrapper.
> There is a negligible performance difference between the two. We may
> still ship the internal call implementation for reasons unrelated to
> performance; it reduces our library dependencies and makes it harder
> to do something malicious via library substitution.
>
> -Allan
>
> --
> Allan Hsu <allan at counterpop dot net>
> 1E64 E20F 34D9 CBA7 1300 1457 AC37 CBBB 0E92 C779
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
More information about the Mono-devel-list
mailing list