To my knowledge JavaScript really isn't that dangerous. If you're browser is lagging for whatever reason it's probably due to a hardware or software fault. If the problem were related to JavaScript it would only be because it's poorly implemented (I've crashed browsers many times writing poor JavaScript).
JavaScript can't do any real damage to your computer unless there's a security flaw with your web browser…