<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>speed | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/speed/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Tue, 18 Mar 2025 09:04:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>speed | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>How fast is a Raspberry Pi 5?</title>
		<link>https://learncgames.com/how-fast-is-a-raspberry-pi-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-fast-is-a-raspberry-pi-5</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 18 Mar 2025 00:05:10 +0000</pubDate>
				<category><![CDATA[64-bit]]></category>
		<category><![CDATA[raspberry-pi]]></category>
		<category><![CDATA[Rust]]></category>
		<category><![CDATA[poker]]></category>
		<category><![CDATA[speed]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3340</guid>

					<description><![CDATA[<p>I recently bought one with 8 GB RAM pictured above. I haven&#8217;t got an SSD for it yet so am still pottering about with an SD Card. I&#8217;ve installed VS Code, clang. and Rust along with the VS Code extensions Rust-Analyzer and codelldb. Out of curiosity I compiled and ran a Rust program that reads [&#8230;]</p>
The post <a href="https://learncgames.com/how-fast-is-a-raspberry-pi-5/">How fast is a Raspberry Pi 5?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:20,&quot;href&quot;:&quot;https:\/\/github.com\/David-H-Bolton\/Projects\/blob\/main\/rust_pokerhand_faster.zip&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft size-full wp-image-3341" src="https://learncgames.com/wp-content/uploads/2025/03/raspi-5.png" alt="Raspberry PI 5" width="606" height="402" srcset="https://learncgames.com/wp-content/uploads/2025/03/raspi-5.png 606w, https://learncgames.com/wp-content/uploads/2025/03/raspi-5-300x199.png 300w" sizes="(max-width: 606px) 100vw, 606px" />I recently bought one with 8 GB RAM pictured above. I haven&#8217;t got an SSD for it yet so am still pottering about with an SD Card.</p>
<p>I&#8217;ve installed VS Code, clang. and Rust along with the VS Code extensions Rust-Analyzer and codelldb.</p>
<p>Out of curiosity I compiled and ran a Rust program that reads in a text file of 1,000 lines of text with each line holding 7 random cards like this: AH 6D 2C 4S JD QH QC.</p>
<p>The idea is to load the file into RAM then process each line and determine the best poker hand.</p>
<p>On my PC 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (which runs Windows 11), I compared running the Rust program in Windows 11, on Ubuntu 24.04 LTS running in a Hyper-V VM on the same PC and on the Raspberry Pi 5 using it&#8217;s own Debian (Bookworm) version.</p>
<p>Here are the times per hand.</p>
<ul>
<li><strong>Windows</strong>: 175 ns.</li>
<li><strong>Ubuntu on Hyper-V</strong> 125 ns</li>
<li><strong>Raspberry Pi 5</strong>: 175 ns.</li>
</ul>
<p>You can download the project with the test cards from <a title="Download Rust project zip file from GitHub" href="https://github.com/David-H-Bolton/Projects/blob/main/rust_pokerhand_faster.zip">GitHub</a>. This link is a zip file containing the project file.</p>
<p>To run it in release in VS Code, in the terminal type in</p>
<pre>cargo run --release 1000_card_hands.txt</pre>
<pre><img decoding="async" class="alignleft size-full wp-image-3342" src="https://learncgames.com/wp-content/uploads/2025/03/timings.png" alt="Timings running under Ubuntu" width="710" height="90" srcset="https://learncgames.com/wp-content/uploads/2025/03/timings.png 710w, https://learncgames.com/wp-content/uploads/2025/03/timings-300x38.png 300w" sizes="(max-width: 710px) 100vw, 710px" /></pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Or you can view the test cards which include the results with commemts in the test file. No need to run it release.</p>
<pre>cargo run --features=show_cards test_card_hands.txt

<img decoding="async" class="alignleft size-full wp-image-3344" src="https://learncgames.com/wp-content/uploads/2025/03/showcards.png" alt="Showing cards with test data" width="815" height="431" srcset="https://learncgames.com/wp-content/uploads/2025/03/showcards.png 815w, https://learncgames.com/wp-content/uploads/2025/03/showcards-300x159.png 300w, https://learncgames.com/wp-content/uploads/2025/03/showcards-768x406.png 768w" sizes="(max-width: 815px) 100vw, 815px" />
</pre>
<p>What is so suprising is that the time on Windows and Rapberry Pi 5 are the same. Windows is running a virus checker (Windows Defender) and I guess that might slow it a bit. </p>The post <a href="https://learncgames.com/how-fast-is-a-raspberry-pi-5/">How fast is a Raspberry Pi 5?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3340</post-id>	</item>
	</channel>
</rss>
