<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Few speed tests about the slow Math.stuff&#8230; now using lookup tables instead.</title>
		<atom:link href="http://cycling74.com/forums/topic/few-speed-tests-about-the-slow-math-stuff-now-using-lookup-tables-instead/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/few-speed-tests-about-the-slow-math-stuff-now-using-lookup-tables-instead/feed</link>
		<description></description>
		<pubDate>Mon, 17 Jun 2013 22:40:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/few-speed-tests-about-the-slow-math-stuff-now-using-lookup-tables-instead/#post-60753</guid>
					<title><![CDATA[Few speed tests about the slow Math.stuff&#8230; now using lookup tables instead.]]></title>
					<link>http://cycling74.com/forums/topic/few-speed-tests-about-the-slow-math-stuff-now-using-lookup-tables-instead/#post-60753</link>
					<pubDate>Mon, 19 Dec 2011 14:20:43 +0000</pubDate>
					<dc:creator>Alexandre</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>I use some giant loops in java, so i made few speed tests, just wanted to share them:</p>
<p>//  CALCULATIONS IN JAVA &#8211; SPEED TESTS :<br />
	//<br />
	// OK in giant loops&#8230;<br />
	//			                assignment: ~ 1-5 cycles<br />
	//			addition/substraction: ~ 1-5 cycles<br />
	//			            multiplication: ~ 3-6 cycles<br />
	//<br />
	// Not so ok&#8230;                       division: ~ 10-20 cycles<br />
	//<br />
	// Not ok at all&#8230;<br />
	//    		           Math.pow(&#8230;,1 or 2): ~ 55 cycles<br />
	//     		 	           Math.exp: ~ 75 cycles<br />
	// 			                    Math.log: ~ 95 cycles<br />
	//				     Math.random: ~ 120 cycles<br />
	//		       Math.pow(&#8230;,anything): ~ 460 cycles !<br />
	//		  	       Math.pow(&#8230;,0.5): ~ 720 cycles !!!</p>
<p>(Cycles of my I7 processor)</p>
<p>So after that, i made some look-up tables classes for this Math.stuff, 24 times faster than Math.pow, if you want them, just ask!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

