RSS start | index | login or register | find | edit
Online for 7556 days.




sticky snips:



no backlinks


16 active users:

unknown (16)

Recent edits:

2003-08-22-lang stick
by unknown, a long time ago

Memoization in Java Using Dynamic Proxy Classes (via LtU)

"Memoization is a technique borrowed from functional programming languages like Lisp, Python, and Perl for giving functions a memory of previously computed values. Memoizing a function adds a transparent caching wrapper to the function, so that function values that have already been calculated are returned from a cache rather than being recomputed each time."

"The whole point of using caching is to improve the speed of your application. However, reflection is notorious for its lack of performance. (The gap is closing, though: Bloch reports that in the Sun implementation of J2SE 1.4, reflective calls are typically only twice as slow as normal calls, compared to a forty-fold difference in J2SE 1.3.)"


Njo - ich glaub das die idee einen cache über ein klasse laufen zu lassen nicht schlecht ist... ein problem ist halt(wird auch im artikel kurz angesprochen), dass die gechachte methode weder den state der klasse verändern noch - was fast noch wichtiger ist - nicht davon abhängig sein darf.. des weiteren cached (wenn ich das richtig gelesen hab) die Memoizer klasse alle methoden - dh sie meiner ansicht nach, ausschließlich für utility klassen einsetzbar...

hmm - hmm - hmm... bei gelegenheit, wenn ich bissi mehr zeit hab, sollt ich mir noch mal gedanken über die sache machen.



no comments yet!

Please log in (you may want to register first) to post comments!
No attachments for this snip.
Upload / manage attachments!
  c'est un vanilla site