{
  "id": 93789,
  "title": "Just speed up calculate distance from benchmark",
  "url": "/competitions/champs-scalar-coupling/discussion/93789",
  "author_name": "",
  "post_date": "2019-05-30T02:36:12.527896800Z",
  "votes": 33,
  "comment_count": 6,
  "views": 0,
  "content": "<p>In Atomic Distance Benchmark kernel by inversion, \nI found '#(there's ways to speed this up!)'. I tried to find the faster way to calculate distance and share it. \nLet's research FASTER :)</p>\n\n<p><a href=\"https://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark\">https://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark</a></p>\n\n<p>From</p>\n\n<blockquote>\n  <p>CPU times: user 7min 19s, sys: 9.25 s, total: 7min 28s \n  Wall time: 7min 28s</p>\n</blockquote>\n\n<p>To</p>\n\n<blockquote>\n  <p>CPU times: user 412 ms, sys: 828 ms, total: 1.24 s \n  Wall time: 1.23 s</p>\n</blockquote>",
  "messages": [
    {
      "id": "539387",
      "postDate": "05/30/2019 02:36:12",
      "content": "<p>In Atomic Distance Benchmark kernel by inversion, \nI found '#(there's ways to speed this up!)'. I tried to find the faster way to calculate distance and share it. \nLet's research FASTER :)</p>\n\n<p><a href=\"https://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark\">https://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark</a></p>\n\n<p>From</p>\n\n<blockquote>\n  <p>CPU times: user 7min 19s, sys: 9.25 s, total: 7min 28s \n  Wall time: 7min 28s</p>\n</blockquote>\n\n<p>To</p>\n\n<blockquote>\n  <p>CPU times: user 412 ms, sys: 828 ms, total: 1.24 s \n  Wall time: 1.23 s</p>\n</blockquote>",
      "rawMarkdown": "In Atomic Distance Benchmark kernel by inversion, \nI found '#(there's ways to speed this up!)'. I tried to find the faster way to calculate distance and share it. \nLet's research FASTER :)\n\nhttps://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark\n\nFrom\n&gt; CPU times: user 7min 19s, sys: 9.25 s, total: 7min 28s \nWall time: 7min 28s\n\n\nTo\n&gt;CPU times: user 412 ms, sys: 828 ms, total: 1.24 s \nWall time: 1.23 s",
      "votes": null
    },
    {
      "id": "539395",
      "postDate": "05/30/2019 02:43:21",
      "content": "<p>Wow! Impressive speedup, nice work! It's amazing how much faster numpy vectorized functions are vs pure python.</p>",
      "rawMarkdown": "Wow! Impressive speedup, nice work! It's amazing how much faster numpy vectorized functions are vs pure python.",
      "votes": null
    },
    {
      "id": "539414",
      "postDate": "05/30/2019 03:19:27",
      "content": "<p>That's fantastic actually, thanks for sharing! Vectorized functions definitely seem to be the way to go here.</p>",
      "rawMarkdown": "That's fantastic actually, thanks for sharing! Vectorized functions definitely seem to be the way to go here.",
      "votes": null
    },
    {
      "id": "539504",
      "postDate": "05/30/2019 06:08:23",
      "content": "<p>This article explains why: <a href=\"https://realpython.com/numpy-array-programming/\">https://realpython.com/numpy-array-programming/</a>\nTLDR: vectorization helps avoid the overhead of for-loop</p>",
      "rawMarkdown": "This article explains why: https://realpython.com/numpy-array-programming/\nTLDR: vectorization helps avoid the overhead of for-loop",
      "votes": null
    },
    {
      "id": "539893",
      "postDate": "05/30/2019 17:01:03",
      "content": "<p>Thanks for sharing! I knew there had to be a much quicker way but was too lazy to look it up. :-)</p>",
      "rawMarkdown": "Thanks for sharing! I knew there had to be a much quicker way but was too lazy to look it up. :-)",
      "votes": null
    },
    {
      "id": "540007",
      "postDate": "05/30/2019 21:16:19",
      "content": "<p>Chanran's speed up is amazing. np.einsum is actually 2 times faster than np.linalg.norm. </p>\n\n<p>Check it out here: <a href=\"https://www.kaggle.com/rakibilly/faster-distance-calculation-from-benchmark\">faster einsum distance</a></p>",
      "rawMarkdown": "Chanran's speed up is amazing. np.einsum is actually 2 times faster than np.linalg.norm. \n\nCheck it out here: [faster einsum distance](https://www.kaggle.com/rakibilly/faster-distance-calculation-from-benchmark)",
      "votes": null
    },
    {
      "id": "540054",
      "postDate": "05/31/2019 00:16:50",
      "content": "<p>thanks :) I will check it out!!</p>",
      "rawMarkdown": "thanks :) I will check it out!!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 539395,
      "author_name": "robikscube",
      "author_url": "",
      "post_date": "05/30/2019 02:43:21",
      "content": "<p>Wow! Impressive speedup, nice work! It's amazing how much faster numpy vectorized functions are vs pure python.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 539414,
      "author_name": "anishagnihotri",
      "author_url": "",
      "post_date": "05/30/2019 03:19:27",
      "content": "<p>That's fantastic actually, thanks for sharing! Vectorized functions definitely seem to be the way to go here.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 539504,
      "author_name": "vivaroma",
      "author_url": "",
      "post_date": "05/30/2019 06:08:23",
      "content": "<p>This article explains why: <a href=\"https://realpython.com/numpy-array-programming/\">https://realpython.com/numpy-array-programming/</a>\nTLDR: vectorization helps avoid the overhead of for-loop</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 539893,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "05/30/2019 17:01:03",
      "content": "<p>Thanks for sharing! I knew there had to be a much quicker way but was too lazy to look it up. :-)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 540007,
      "author_name": "rakibilly",
      "author_url": "",
      "post_date": "05/30/2019 21:16:19",
      "content": "<p>Chanran's speed up is amazing. np.einsum is actually 2 times faster than np.linalg.norm. </p>\n\n<p>Check it out here: <a href=\"https://www.kaggle.com/rakibilly/faster-distance-calculation-from-benchmark\">faster einsum distance</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 540054,
          "author_name": "seriousran",
          "author_url": "",
          "post_date": "05/31/2019 00:16:50",
          "content": "<p>thanks :) I will check it out!!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "539387": "In Atomic Distance Benchmark kernel by inversion, \nI found '#(there's ways to speed this up!)'. I tried to find the faster way to calculate distance and share it. \nLet's research FASTER :)\n\nhttps://www.kaggle.com/seriousran/just-speed-up-calculate-distance-from-benchmark\n\nFrom\n&gt; CPU times: user 7min 19s, sys: 9.25 s, total: 7min 28s \nWall time: 7min 28s\n\n\nTo\n&gt;CPU times: user 412 ms, sys: 828 ms, total: 1.24 s \nWall time: 1.23 s",
    "539395": "Wow! Impressive speedup, nice work! It's amazing how much faster numpy vectorized functions are vs pure python.",
    "539414": "That's fantastic actually, thanks for sharing! Vectorized functions definitely seem to be the way to go here.",
    "539504": "This article explains why: https://realpython.com/numpy-array-programming/\nTLDR: vectorization helps avoid the overhead of for-loop",
    "539893": "Thanks for sharing! I knew there had to be a much quicker way but was too lazy to look it up. :-)",
    "540007": "Chanran's speed up is amazing. np.einsum is actually 2 times faster than np.linalg.norm. \n\nCheck it out here: [faster einsum distance](https://www.kaggle.com/rakibilly/faster-distance-calculation-from-benchmark)",
    "540054": "thanks :) I will check it out!!"
  },
  "source": "meta"
}