As far as I know there are no libraries that optimize code for J.
On the other hand, there are certain functions and primitives in J that are optimized very well, the best example of course being the i. or iota function. Furthermore the compiler itself can detect patterns and optimize them (Dyalog APL is also well known for this). There are also patterns that are faster than others. The j for c programmers book in general has much information about optimization, the chapter https://www.jsoftware.com/help/jforc/performance_measurement__tip.htm in particular is probably the best resource out there.
In summary, most optimization tasks are best left to the compiler, and if you have a particular bottleneck, see if you can't improve the pattern of your functions.