Raif S. Naffah wrote:
> the attached patch adds support for GNU MP in BigInteger 
> if/when configured.

How/why is the native version better? Is it really worthwhile to
complicate the code this way? Where are the benchmarks that prove the
native code is faster?

I assume it is already widely know that I dislike native code (because
of how IKVM works), but let me try to explain why native code sucks for
all VMs:

- Some VMs are hardened against stack overflow, this means that stack
overflow in Java or VM code will not result in terminating the process,
but simply a StackOverflowException. Is the native code you are
introducing similarly harneded?
- Some VMs are hardened against OOM, this means that memory allocation
failures (both in Java and in the VM) will not result in terminating the
process, but simply a OutOfMemoryError. Is the native code you are
introducing similarly harneded?
- Native memory allocation potentially fragments the heap and this can
have significant performance implications.
- Can you prove there aren't any security holes in your native code?

Most people do not understand the (security) implications of using
native code in combination with handles and most of the code out there
is simply wrong (as is the current patch). See [1].

Regards,
Jeroen

[1]
http://www.hpl.hp.com/personal/Hans_Boehm/misc_slides/java_finalizers.pd
f

Reply via email to