diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php
index 538ab6d..9a6b0b3 100644
--- a/core/lib/Drupal/Core/Config/Config.php
+++ b/core/lib/Drupal/Core/Config/Config.php
@@ -310,7 +310,7 @@ class Config {
    * Saves the configuration object.
    */
   public function save() {
-    $this->sortByKey($this->data);
+    ksort($this->data);
     $this->storage->write($this->name, $this->data);
     $this->isNew = FALSE;
     $this->notify('save');
@@ -331,26 +331,6 @@ class Config {
   }
 
   /**
-   * Sorts all keys in configuration data.
-   *
-   * Ensures that re-inserted keys appear in the same location as before, in
-   * order to ensure an identical order regardless of storage controller.
-   * A consistent order is important for any storage that allows any kind of
-   * diff operation.
-   *
-   * @param array $data
-   *   An associative array to sort recursively by key name.
-   */
-  public function sortByKey(array &$data) {
-    ksort($data);
-    foreach ($data as &$value) {
-      if (is_array($value)) {
-        $this->sortByKey($value);
-      }
-    }
-  }
-
-  /**
    * Deletes the configuration object.
    */
   public function delete() {
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
index 9eea495..4e13888 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
@@ -96,10 +96,22 @@ class ConfigCRUDTest extends WebTestBase {
    * Tests Drupal\Core\Config\Config::sortByKey().
    */
   function testDataKeySort() {
+    $alpha_numbers = array(
+        'one' => 'one',
+        'two' => 'two',
+        'three' => 'three',
+        'four' => 'four',
+        'five' => 'five'
+    );
     $config = config('config_test.keysort');
     $config->set('new', 'Value to be replaced');
     $config->set('static', 'static');
+    $config->set('array', $alpha_numbers);
     $config->save();
+
+    // Ensure the array order has not changed.
+    $this->assertIdentical($config->get('array'), $alpha_numbers);
+
     // Clone this Config, so this test does not rely on any particular
     // architecture.
     $config = clone $config;
