{"id":2383,"date":"2021-04-26T19:32:57","date_gmt":"2021-04-26T14:02:57","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2383"},"modified":"2021-04-26T19:32:57","modified_gmt":"2021-04-26T14:02:57","slug":"lparallel-a-parallel-programming-library","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/","title":{"rendered":"lparallel: A Parallel Programming Library"},"content":{"rendered":"<p>You may recall that in the last article I had reviewed the book <a href=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/12\/book-review-programming-algorithms-in-lisp\/\" target=\"_blank\" rel=\"noopener\"><em><strong>&#8220;Algorithms in Lisp&#8221;<\/strong><\/em><\/a>\u00a0by <em><strong>Vsevolod Domkin<\/strong><\/em>. There was a reference to the <a href=\"https:\/\/lparallel.org\" target=\"_blank\" rel=\"noopener\"><em><strong>lparallel<\/strong><\/em><\/a>\u00a0library in <em><strong>Chapter 15<\/strong><\/em> of the book. That immediately reminded me of the nice discussion of <em><strong>lparallel<\/strong><\/em> by <em><strong>Edi Weitz<\/strong><\/em> in <em><strong>Chapter 11<\/strong><\/em> of his excellent book <a href=\"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/15\/book-review-common-lisp-recipes-by-edi-weitz\/\" target=\"_blank\" rel=\"noopener\"><em><strong>&#8220;Common Lisp Recipes&#8221;<\/strong><\/em><\/a>.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>Since I have not used <em><strong>lparallel<\/strong><\/em> so far, I wanted to check it out. Instead of trying something very original, I decided to start with the <em><strong>&#8220;pmap&#8221;<\/strong><\/em> example in Edi&#8217;s book.<\/p>\n<p>Here is the code for the <em><strong>&#8220;pmap&#8221;<\/strong><\/em> example:<\/p>\n<figure id=\"attachment_2384\" aria-describedby=\"caption-attachment-2384\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"2384\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/pmap\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg\" data-orig-size=\"1081,749\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619280367&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pmap: Parallel Map\" data-image-description=\"&lt;p&gt;pmap: Parallel Map&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;pmap: Parallel Map&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap-1024x710.jpg\" class=\"wp-image-2384\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?resize=650%2C450&#038;ssl=1\" alt=\"pmap: Parallel Map\" width=\"650\" height=\"450\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?resize=300%2C208&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?resize=1024%2C710&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?resize=768%2C532&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/pmap.jpg?w=1081&amp;ssl=1 1081w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-2384\" class=\"wp-caption-text\"><strong>pmap: Parallel Map<\/strong><\/figcaption><\/figure>\n<p>I made a minor change to <em><strong>&#8220;test&#8221;<\/strong><\/em> and <em><strong>&#8220;ptest&#8221;<\/strong><\/em> to return <em><strong>&#8220;t&#8221;<\/strong><\/em> instead of the mapped result. This is to avoid the large data dump when I execute the function on the console. Of course, if I wanted to compare the results of the two maps, I would have retained the original code, but that was not my intention. My focus was on the speed up due to parallel execution.<\/p>\n<p>Here is my environment:<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">1) Intel Core i7-7700 CPU @ 3.60 GHz, 32 GB RAM, Windows 10, 64-bit.<span class=\"Apple-converted-space\">\u00a0<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">2) LispWorks 7.1.2 Enterprise Edition (64-bit).<\/span><\/p><\/blockquote>\n<p>In fact, before running the <em><strong>&#8220;pmap&#8221;<\/strong><\/em> test, I wanted to find out the number of <em><strong>CPU cores<\/strong><\/em> on my <em><strong>Windows<\/strong><\/em> machine. Interestingly, in <em><strong>Section 11-6<\/strong><\/em>, <em><strong>Edi Weitz<\/strong><\/em> gives a\u00a0<em><strong>&#8220;CFFI&#8221;<\/strong><\/em>-based implementation that does the job. I decided to use that:<\/p>\n<figure id=\"attachment_2386\" aria-describedby=\"caption-attachment-2386\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2386\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/cores\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg\" data-orig-size=\"1120,826\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619280320&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Finding the Number of CPU Cores\" data-image-description=\"&lt;p&gt;Finding the Number of CPU Cores&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Finding the Number of CPU Cores&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-1024x755.jpg\" class=\"wp-image-2386\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?resize=650%2C479&#038;ssl=1\" alt=\"Finding the Number of CPU Cores\" width=\"650\" height=\"479\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?resize=300%2C221&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?resize=1024%2C755&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?resize=768%2C566&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores.jpg?w=1120&amp;ssl=1 1120w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-2386\" class=\"wp-caption-text\"><strong>Finding the Number of CPU Cores<\/strong><\/figcaption><\/figure>\n<p>Here is what I get when I execute <em><strong>&#8220;(get-number-of-processors)&#8221;:<\/strong><\/em><\/p>\n<figure id=\"attachment_2387\" aria-describedby=\"caption-attachment-2387\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2387\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/numcores\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg\" data-orig-size=\"739,150\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619449244&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Available CPU Cores\" data-image-description=\"&lt;p&gt;Available CPU Cores&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Available CPU Cores&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg\" class=\"wp-image-2387\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg?resize=500%2C101&#038;ssl=1\" alt=\"Available CPU Cores\" width=\"500\" height=\"101\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg?resize=300%2C61&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/numcores.jpg?w=739&amp;ssl=1 739w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-2387\" class=\"wp-caption-text\"><strong>Available CPU Cores<\/strong><\/figcaption><\/figure>\n<p>When using <em><strong>lparallel<\/strong><\/em>, we have to specify the number of worker threads to use as part of its <em><strong>&#8220;kernel&#8221;<\/strong><\/em>.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>First, I ran <em><strong>&#8220;(test)&#8221;<\/strong><\/em> and <em><strong>&#8220;(ptest)&#8221;<\/strong><\/em> with 4 kernel threads:<\/p>\n<figure id=\"attachment_2388\" aria-describedby=\"caption-attachment-2388\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2388\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/session1-3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg\" data-orig-size=\"1099,777\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619257433&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Testing with 4 Kernel Threads\" data-image-description=\"&lt;p&gt;Testing with 4 Kernel Threads&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Testing with 4 Kernel Threads&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1-1024x724.jpg\" class=\"wp-image-2388\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?resize=650%2C460&#038;ssl=1\" alt=\"Testing with 4 Kernel Threads\" width=\"650\" height=\"460\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?resize=300%2C212&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?resize=1024%2C724&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?resize=768%2C543&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1.jpg?w=1099&amp;ssl=1 1099w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-2388\" class=\"wp-caption-text\"><strong>Testing with 4 Kernel Threads<\/strong><\/figcaption><\/figure>\n<p>Looking at the <em><strong>&#8220;Elapsed Time&#8221;<\/strong><\/em> field, we see that <em><strong>&#8220;ptest&#8221;<\/strong>\u00a0is 3 times faster than <\/em><strong>&#8220;test&#8221;<\/strong><em>.\u00a0<\/em>To see the <em><strong>CPU utilization<\/strong><\/em>, I ran Window&#8217;s <em><strong>Task Manager<\/strong><\/em>.\u00a0This is what I see when the <em><strong>&#8220;<\/strong><strong>(test)&#8221;<\/strong><\/em> function is executing:<\/p>\n<figure id=\"attachment_2390\" aria-describedby=\"caption-attachment-2390\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2390\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/cores-4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg\" data-orig-size=\"657,672\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619448668&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Task Manager: CPU Utilization\" data-image-description=\"&lt;p&gt;Task Manager: CPU Utilization&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Task Manager: CPU Utilization&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg\" class=\"wp-image-2390\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg?resize=450%2C460&#038;ssl=1\" alt=\"Task Manager: CPU Utilization\" width=\"450\" height=\"460\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg?resize=293%2C300&amp;ssl=1 293w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-4.jpg?w=657&amp;ssl=1 657w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><figcaption id=\"caption-attachment-2390\" class=\"wp-caption-text\"><strong>Task Manager: CPU Utilization (test)<\/strong><\/figcaption><\/figure>\n<p>You will notice that the CPU utilization is not that great. When I run the paralel version, <em><strong>&#8220;(ptest)&#8221;<\/strong><\/em>, the situation changes:<\/p>\n<figure id=\"attachment_2391\" aria-describedby=\"caption-attachment-2391\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2391\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/cores-5\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg\" data-orig-size=\"661,668\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619448787&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Task Manager: CPU Utilization (pest)\" data-image-description=\"&lt;p&gt;Task Manager: CPU Utilization (pest)&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Task Manager: CPU Utilization (pest)&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg\" class=\"wp-image-2391\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg?resize=450%2C455&#038;ssl=1\" alt=\"Task Manager: CPU Utilization (pest)\" width=\"450\" height=\"455\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg?resize=297%2C300&amp;ssl=1 297w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-5.jpg?w=661&amp;ssl=1 661w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><figcaption id=\"caption-attachment-2391\" class=\"wp-caption-text\"><strong>Task Manager: CPU Utilization (ptest)<\/strong><\/figcaption><\/figure>\n<p>You can see the significant jump in the CPU utilization and the reduction in time taken. Good, that shows <em><strong>lparallel<\/strong><\/em> is working!<\/p>\n<p>By the way, <em><strong>&#8220;Cores&#8221;<\/strong><\/em> in the utilization chart refers to the <em><strong>&#8220;physical&#8221;<\/strong><\/em> (or actual) hardware cores in the CPU. <em><strong>&#8220;Logical processors&#8221;<\/strong><\/em> is the total number of threads that can run in parallel. If the hardware supports <em><strong>&#8220;Hyperthreading&#8221;<\/strong><\/em>, as is true in my case, then multiple threads can run on the same core in parallel. That is why on my 4-core machine, I am able to run 8 threads in parallel.<\/p>\n<p>Let us now try the two functions with 8 worker threads.<\/p>\n<figure id=\"attachment_2392\" aria-describedby=\"caption-attachment-2392\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2392\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/session1b\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg\" data-orig-size=\"1092,697\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619263015&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"With 8 Worker Threads in Kernel\" data-image-description=\"&lt;p&gt;With 8 Worker Threads in Kernel&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;With 8 Worker Threads in Kernel&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b-1024x654.jpg\" class=\"wp-image-2392\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?resize=650%2C415&#038;ssl=1\" alt=\"With 8 Worker Threads in Kernel\" width=\"650\" height=\"415\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?resize=300%2C191&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?resize=1024%2C654&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?resize=768%2C490&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?resize=140%2C90&amp;ssl=1 140w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session1b.jpg?w=1092&amp;ssl=1 1092w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-2392\" class=\"wp-caption-text\"><strong>With 8 Worker Threads in Kernel<\/strong><\/figcaption><\/figure>\n<p>What about CPU utilization with increased threads?<\/p>\n<p>We do not expect <em><strong>&#8220;(test)&#8221;<\/strong><\/em> to have any impact:<\/p>\n<figure id=\"attachment_2394\" aria-describedby=\"caption-attachment-2394\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2394\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/cores-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg\" data-orig-size=\"655,683\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619450052&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CPU Utilization with 8 Cores: (test)\" data-image-description=\"&lt;p&gt;CPU Utilization with 8 Cores: (test)&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;CPU Utilization with 8 Cores: (test)&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg\" class=\"wp-image-2394\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg?resize=450%2C469&#038;ssl=1\" alt=\"CPU Utilization with 8 Cores: (test)\" width=\"450\" height=\"469\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg?resize=288%2C300&amp;ssl=1 288w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-2.jpg?w=655&amp;ssl=1 655w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><figcaption id=\"caption-attachment-2394\" class=\"wp-caption-text\"><strong>CPU Utilization with 8 Cores: (test)<\/strong><\/figcaption><\/figure>\n<p>Now see how it changes dramatically when running <strong><em>&#8220;(ptest)&#8221;<\/em><\/strong>:<\/p>\n<figure id=\"attachment_2395\" aria-describedby=\"caption-attachment-2395\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2395\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/cores-3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg\" data-orig-size=\"658,679\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619448311&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CPU Utilization with 8 Cores: (test)\" data-image-description=\"&lt;p&gt;CPU Utilization with 8 Cores: (test)&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;CPU Utilization with 8 Cores: (test)&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg\" class=\"wp-image-2395\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg?resize=450%2C464&#038;ssl=1\" alt=\"CPU Utilization with 8 Cores: (test)\" width=\"450\" height=\"464\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg?resize=291%2C300&amp;ssl=1 291w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Cores-3.jpg?w=658&amp;ssl=1 658w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><figcaption id=\"caption-attachment-2395\" class=\"wp-caption-text\"><strong>CPU Utilization with 8 Cores: (test)<\/strong><\/figcaption><\/figure>\n<p>We have <em><strong>100% CPU utilization<\/strong><\/em> when the function executes!<\/p>\n<p>Next, I wanted to try the classical <em><strong>&#8220;Fibonacci&#8221;<\/strong><\/em> computation using <em><strong>lparallel<\/strong><\/em>. Here are 3 versions of the implementation:<\/p>\n<figure id=\"attachment_2396\" aria-describedby=\"caption-attachment-2396\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2396\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/fib\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg\" data-orig-size=\"749,693\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619452927&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Calculating the Fibonacci Series\" data-image-description=\"&lt;p&gt;Calculating the Fibonacci Series&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Calculating the Fibonacci Series&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg\" class=\"wp-image-2396\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg?resize=500%2C463&#038;ssl=1\" alt=\"Calculating the Fibonacci Series\" width=\"500\" height=\"463\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg?resize=300%2C278&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Fib.jpg?w=749&amp;ssl=1 749w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-2396\" class=\"wp-caption-text\"><strong>Calculating the Fibonacci Series<\/strong><\/figcaption><\/figure>\n<p>Explanation:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">1) <em><strong>&#8220;fib&#8221;<\/strong><\/em> is the standard recursive implementation.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">2) <em><strong>&#8220;pfib&#8221;<\/strong><\/em> uses the <em><strong>lparallel<\/strong><\/em> construct <em><strong>&#8220;plet&#8221;<\/strong><\/em>. This results in two parallel threads computing <em><strong>(fib n-1)<\/strong><\/em> and <em><strong>(fib n-2)<\/strong><\/em>. When they are done, the result is summed and returned. Note that the two threads run the first defintion <em><strong>&#8220;fib&#8221;<\/strong><\/em>.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">3) <em><strong>&#8220;pfib2&#8221;<\/strong><\/em> is an extreme case of parallelism. It uses <em><strong>&#8220;defpun&#8221;<\/strong><\/em> construct of <em><strong>lparallel<\/strong><\/em> to define a function that can automatically execute in a parallel thread. Additionally, it uses <em><strong>&#8220;plet&#8221;<\/strong><\/em> and makes recursive calls to itself! This results in creating a very large number of threads, unmindful of the hardware support available. This can slow down the computation significantly.<\/span><\/p><\/blockquote>\n<p>This is what happens when these functions are run:<\/p>\n<figure id=\"attachment_2397\" aria-describedby=\"caption-attachment-2397\" style=\"width: 501px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2397\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/26\/lparallel-a-parallel-programming-library\/session3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg\" data-orig-size=\"1096,913\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1619280065&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Performance of Fibonacci Implementations\" data-image-description=\"&lt;p&gt;Performance of Fibonacci Implementations&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Performance of Fibonacci Implementations&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3-1024x853.jpg\" class=\"wp-image-2397\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?resize=501%2C417&#038;ssl=1\" alt=\"Performance of Fibonacci Implementations\" width=\"501\" height=\"417\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?resize=300%2C250&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?resize=1024%2C853&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?resize=768%2C640&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Session3.jpg?w=1096&amp;ssl=1 1096w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/a><figcaption id=\"caption-attachment-2397\" class=\"wp-caption-text\"><strong>Performance of Fibonacci Implementations<\/strong><\/figcaption><\/figure>\n<p>A look at the <em><strong>&#8220;Elapsed time&#8221;<\/strong> <\/em>shows that <em><strong>&#8220;pfib&#8221;<\/strong> <\/em>is faster than <em><strong>&#8220;fib&#8221;<\/strong><\/em> (by about 1.6 times), but <em><strong>&#8220;pfib2&#8221;<\/strong><\/em> is pathetically slow as expected!<\/p>\n<p>That concludes today&#8217;s discussion on <a href=\"https:\/\/lparallel.org\" target=\"_blank\" rel=\"noopener\"><em><strong>lparallel<\/strong><\/em><\/a>. It is a feature rich library and well documented. I intend to spend more time understanding its capabilities, and hope to apply it in one or more of my Lisp projects.<\/p>\n<p>You can <a href=\"http:\/\/www.rangakrish.com\/downloads\/lparallel-test.lisp\" target=\"_blank\" rel=\"noopener\"><em><strong>download<\/strong><\/em><\/a> the source code for today&#8217;s experiment.<\/p>\n<p>Have a nice week ahead!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may recall that in the last article I had reviewed the book &#8220;Algorithms in Lisp&#8221;\u00a0by Vsevolod Domkin. There was a reference to the lparallel\u00a0library in Chapter 15 of the book. That immediately reminded me of the nice discussion of lparallel by Edi Weitz in Chapter 11 of his excellent book &#8220;Common Lisp Recipes&#8221;.\u00a0 Since [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18,17],"tags":[278,277,99,276,279,280],"class_list":["post-2383","post","type-post","status-publish","format-standard","hentry","category-lisp","category-programming","tag-fibonacci","tag-lisp-programming","tag-lispworks","tag-lparallel-lisp-library","tag-map","tag-parallel-map"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-Cr","jetpack-related-posts":[{"id":2377,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/12\/book-review-programming-algorithms-in-lisp\/","url_meta":{"origin":2383,"position":0},"title":"Book Review: Programming Algorithms in Lisp","author":"admin","date":"April 12, 2021","format":false,"excerpt":"Title: Programming Algorithms in Lisp: Writing Efficient Programs with Examples in ANSI Common Lisp Author: Vsevolod Domkin Publisher: Apress Year: 2021 It is only about 5 months since I read and reviewed\u00a0a good book on Lisp written by Micha\u0142 \u201cphoe\u201d Herda. The present book is by Vsevolod Domkin\u00a0and I purchased\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Book-Cover-209x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":190,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/15\/book-review-common-lisp-recipes-by-edi-weitz\/","url_meta":{"origin":2383,"position":1},"title":"Book Review: Common Lisp Recipes &#8211; A Problem-Solution Approach","author":"admin","date":"March 15, 2016","format":false,"excerpt":"Last Saturday (March 12, 2016), I got my most eagerly awaited book from Amazon.com. Yes, I am talking about Common Lisp Recipes: A Problem-Solution Approach\u00a0authored by Dr.Edmund Weitz. Of course, if you have been programming in Lisp for a couple of years, you would have definitely heard of Dr.Edi Weitz,\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2200,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/11\/08\/book-review-the-common-lisp-condition-system-beyond-exception-handling-with-control-flow-mechanisms\/","url_meta":{"origin":2383,"position":2},"title":"Book Review &#8211; The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms.","author":"admin","date":"November 8, 2020","format":false,"excerpt":"Title: The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms Author: Micha\u0142 \"phoe\" Herda Publisher: Apress Year: 2020 Unlike with other languages, it is rare to find new books being published on Lisp. The last book on Lisp, which I purchased was \u201cCommon Lisp Recipes\u201d\u00a0\u00a0by Edmund Weitz\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page-209x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2406,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/05\/09\/eager-future2-common-lisp-library\/","url_meta":{"origin":2383,"position":3},"title":"Eager Future2 Common Lisp Library","author":"admin","date":"May 9, 2021","format":false,"excerpt":"Eager Future2 is a Common Lisp library that facilitates parallel computation. It is based on the idea of a \u201cfuture\u201d that acts as a \u201cproxy\u201d for a concurrently computed expression. Unlike the \u201clparallel\u201d library that I had discussed in the last article, this library does not give us control over\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Fibonacci Calculation - 3 Ways","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/05\/Code-232x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2736,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/03\/19\/book-review-introducing-blockchain-with-lisp\/","url_meta":{"origin":2383,"position":4},"title":"Book Review: Introducing Blockchain with Lisp","author":"admin","date":"March 19, 2022","format":false,"excerpt":"Title: Introducing Blockchain with Lisp: Implement and Extend Blockchains with the Racket Language Author: Boro Sitnikovski Publisher: Apress Year: 2021 Blockchains are a hot topic these days and interestingly, I am getting involved in a project that uses Blockchain. Languages such as C++, Java, Go and Node.js are commonly used\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book-300x251.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3312,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/01\/28\/the-hy-programming-language\/","url_meta":{"origin":2383,"position":5},"title":"The Hy Programming Language","author":"admin","date":"January 28, 2024","format":false,"excerpt":"In an earlier article\u00a0I had explained how to execute Python code from within Common Lisp using \u201cCLPython\u201d package. In contrast to that approach, \u201cHy\u201d\u00a0is a Lisp-style language (not compatible with Common Lisp) that is embedded in Python and hence provides seamless interoperability with Python code. Installation is straightforward (it is\u2026","rel":"","context":"In &quot;Hy Language&quot;","block_context":{"text":"Hy Language","link":"https:\/\/www.rangakrish.com\/index.php\/category\/hy-language\/"},"img":{"alt_text":"Hy REPL","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/01\/console-300x148.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2383"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2383\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}