Update require.js

optimize loop