aboutsummaryrefslogtreecommitdiff
path: root/files/fr/tools/performance/examples
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 12:36:08 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 12:36:08 +0100
commit39f2114f9797eb51994966c6bb8ff1814c9a4da8 (patch)
tree66dbd9c921f56e440f8816ed29ac23682a1ac4ef /files/fr/tools/performance/examples
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.tar.gz
translated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.tar.bz2
translated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.zip
unslug fr: move
Diffstat (limited to 'files/fr/tools/performance/examples')
-rw-r--r--files/fr/tools/performance/examples/index.html8
-rw-r--r--files/fr/tools/performance/examples/sorting_algorithms_comparison/index.html71
2 files changed, 79 insertions, 0 deletions
diff --git a/files/fr/tools/performance/examples/index.html b/files/fr/tools/performance/examples/index.html
new file mode 100644
index 0000000000..e3ca28d9bd
--- /dev/null
+++ b/files/fr/tools/performance/examples/index.html
@@ -0,0 +1,8 @@
+---
+title: Exemples
+slug: Outils/Performance/Examples
+translation_of: Tools/Performance/Examples
+---
+<div>{{ToolsSidebar}}</div><p>Liste des pages de démos pour les scénarios de performances et walkthroughs.</p>
+
+<p>{{ ListSubpages ("/en-US/docs/Tools/Performance/Examples", 5) }}</p>
diff --git a/files/fr/tools/performance/examples/sorting_algorithms_comparison/index.html b/files/fr/tools/performance/examples/sorting_algorithms_comparison/index.html
new file mode 100644
index 0000000000..608691a9d5
--- /dev/null
+++ b/files/fr/tools/performance/examples/sorting_algorithms_comparison/index.html
@@ -0,0 +1,71 @@
+---
+title: Comparaison des algorithmes de tri
+slug: Outils/Performance/Examples/Sorting_algorithms_comparison
+translation_of: Tools/Performance/Examples/Sorting_algorithms_comparison
+---
+<div>{{ToolsSidebar}}</div><p>Ce articlé décrit un programe simple qui est utilisé dans deux des guides de l'outil Performance : le guide pour <a href="/fr/docs/Tools/Performance/Call_Tree">l'arbre d'appel</a> et le guide pour le <a href="/fr/docs/Tools/Performance/Flame_Chart">diagramme de flamme</a>.</p>
+
+<p>Ce programme compare les performances de trois algorithmes de tri différents :</p>
+
+<ul>
+ <li>le tri à bulles</li>
+ <li>le tri par sélection</li>
+ <li>le Ttri rapide</li>
+</ul>
+
+<p>Ce programme est composé des fonctions suivantes :</p>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td><strong><code>sortAll()</code></strong></td>
+ <td>Fonction principale. génère itérativement (200 itérations) des tableaux aléatoires et appelle<code>sort()</code>.</td>
+ </tr>
+ <tr>
+ <td><strong><code>sort()</code></strong></td>
+ <td>Appelle les fonctions <code>bubbleSort()</code>, <code>selectionSort()</code>, et <code>quickSort()</code> tour à tour et affiche le résultat.</td>
+ </tr>
+ <tr>
+ <td><strong><code>bubbleSort()</code></strong></td>
+ <td>Implémente un tri à bulles, retourne le tableau trié</td>
+ </tr>
+ <tr>
+ <td><strong><code>selectionSort()</code></strong></td>
+ <td>Implémente un par sélection retourne le tableau trié</td>
+ </tr>
+ <tr>
+ <td><strong><code>quickSort()</code></strong></td>
+ <td>Implémente un tri rapide, retourne le tableau trié</td>
+ </tr>
+ <tr>
+ <td><code><strong>swap()</strong></code></td>
+ <td>fonction d'aide pour <code>bubbleSort()</code> et <code>selectionSort()</code>.</td>
+ </tr>
+ <tr>
+ <td><code><strong>partition()</strong></code></td>
+ <td>fonction d'aide pour <code>quickSort()</code>.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>le graphique d'appel ressemble à ceci :</p>
+
+<pre>sortAll() // (génère un tableau aléatoire puis appelle sort) x 200
+
+ -&gt; sort() // tri le tableau avec chaque tri et affiche le résultat
+
+ -&gt; bubbleSort()
+
+ -&gt; swap()
+
+ -&gt; selectionSort()
+
+ -&gt; swap()
+
+ -&gt; quickSort()
+
+ -&gt; partition()</pre>
+
+<p>Les implémentations des algorithmes de tri dans ce programme ont été tirées du dépôt <a href="https://github.com/nzakas/computer-science-in-javascript/">https://github.com/nzakas/computer-science-in-javascript/</a> et sont utilisées sous la licence MIT.</p>
+
+<p>Vous pouvez tester ce programme d'exemple <a href="https://mdn.github.io/performance-scenarios/js-call-tree-1/index.html">ici</a> et cloner le code <a href="https://github.com/mdn/performance-scenarios">ici</a> (soyez sûr de bien check out la branche gh-pages).</p>