Re: Caching D compiler - preview version
On Wednesday, 1 November 2017 at 19:33:15 UTC, Walter Bright wrote: On 10/29/2017 9:25 AM, Dmitry Olshansky wrote: On Saturday, 28 October 2017 at 23:18:05 UTC, Martin Nowak wrote: On 10/24/2017 05:02 PM, Dmitry Olshansky wrote: Experimental std.regex.v2 is sadly broken by a recent change to array ops. It would be very interesting to check as it eats up to 17Gb of RAM. What got broken there? New array ops implemented as __simd, I think it needs a __ctfe branch. Please post a bugzilla issue for it. https://issues.dlang.org/show_bug.cgi?id=17964
Re: Caching D compiler - preview version
On 10/29/2017 9:25 AM, Dmitry Olshansky wrote: On Saturday, 28 October 2017 at 23:18:05 UTC, Martin Nowak wrote: On 10/24/2017 05:02 PM, Dmitry Olshansky wrote: Experimental std.regex.v2 is sadly broken by a recent change to array ops. It would be very interesting to check as it eats up to 17Gb of RAM. What got broken there? New array ops implemented as __simd, I think it needs a __ctfe branch. Please post a bugzilla issue for it.
Re: Caching D compiler - preview version
On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map, protected by a spin-lock from races. Dmd processes with -cache flag would detect the following pattern: enum/static variable = func(args..); Just want to give you the short feedback, that I think a caching mechanism sounds very good. When developing for / with vibe.d the problem (is/was) that the Diet-templates where always recompiled, Sönke took my idea to save the result of the evaluation at startup. So that at the second time not the .dt template is parsed and mixed in but a .d file. (See: Experimental HTML template caching at https://github.com/rejectedsoftware/diet-ng/) But they still get compiled every time. Until now I did not found the time to test your compiler, but I think by the right way of caching it should be possible to speed up the edit-compile-cycle significantly. So that using D and not an interpreted language (like Ruby/PHP) becomes more attractive even for small web projects. Regards mt.
Re: Caching D compiler - preview version
On Saturday, 28 October 2017 at 23:18:05 UTC, Martin Nowak wrote: On 10/24/2017 05:02 PM, Dmitry Olshansky wrote: Experimental std.regex.v2 is sadly broken by a recent change to array ops. It would be very interesting to check as it eats up to 17Gb of RAM. What got broken there? New array ops implemented as __simd, I think it needs a __ctfe branch.
Re: Caching D compiler - preview version
On Tuesday, 24 October 2017 at 14:17:32 UTC, Dmitry Olshansky wrote: On Tuesday, 24 October 2017 at 13:29:12 UTC, Mike Parker wrote: On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map, protected by a spin-lock from races. Dmd processes with -cache flag would detect the following pattern: Blog post or it didn't happen! Let us at least try it outside of toy examples. If anybody has std.regex.ctRegex usage I'd be curious to see: 1. Build time w/o -cache=mmap 2. First build time w -cache=mmap 3. Subsequent build times w -cache=mmap P.S. It's a crude PoC. I think we can do better. Another caveat: Posix-only for now. Did a few cleanups and widened the scope a bit. So here is what happens in my benchmark for std.regex. -O -inline -release: 88s --> 80s, memory use ~700Mb -> ~400Mb -release: 19s -> 12.8s Experimental std.regex.v2 is sadly broken by a recent change to array ops. It would be very interesting to check as it eats up to 17Gb of RAM.
Re: Caching D compiler - preview version
On Tuesday, 24 October 2017 at 13:29:12 UTC, Mike Parker wrote: On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map, protected by a spin-lock from races. Dmd processes with -cache flag would detect the following pattern: Blog post or it didn't happen! Let us at least try it outside of toy examples. If anybody has std.regex.ctRegex usage I'd be curious to see: 1. Build time w/o -cache=mmap 2. First build time w -cache=mmap 3. Subsequent build times w -cache=mmap P.S. It's a crude PoC. I think we can do better. --- Dmitry Olshansky
Re: Caching D compiler - preview version
On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map, protected by a spin-lock from races. Dmd processes with -cache flag would detect the following pattern: Ooooh, very nice! Looking forward to non-std lib usage.
Re: Caching D compiler - preview version
On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map, protected by a spin-lock from races. Dmd processes with -cache flag would detect the following pattern: Blog post or it didn't happen!