RSSAmplifier

Jon Kuperman · Sep 7, 2021

JavaScript math methods I never knew existed

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

I was trying to break Cloudflare Workers tonight and did a search for "CPU intensive JavaScript" because I'm really good at my job. This gist popped up with the following code: function mySlowFunction ( baseNumber ) { console . time ( "mySlowFunction" ) let result = 0 for ( var i = Math . pow ( baseNumber , 7 ) ; i >= 0 ; i -- ) { result += Math . atan ( i ) * Math . tan ( i ) } console . timeEnd…

Read on jonkuperman.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.