From: Ken A. <kan...@bb...> - 2004-07-02 21:30:41
|
Tim wrote a tiny version of JScheme, that used reflection extensively, without primitive procedures. Unfortunately, the performance of reflective methods is about 3 times worse than primitives for the -client JVM, though it seems better for the -sever JVM. This got me thinking ... Currently we primitives.scm is used to generate Primitive.java which provides all the JScheme primitives. It aught to be possible to take a class and through reflection, generate a class that provides primitive procedures that correspond to its methods. Take the Math.class for example. sin() would only work for a double, but max and min could work for all numeric types. k |