« first day (2124 days earlier)      last day (1656 days later) » 

12:49 AM
@giuliolunati Yes, there are a few remaining that should be changed, but I couldn't think of what to call the "right answer". The most standardized file typing system is MIME, which has a rather loose mapping to file extensions.
Even once there's a proper content-type or other operation to use, there should likely still be an EXISTS? that is boolean.
 
 
3 hours later…
3:53 AM
@giuliolunati Great, so someone knows about it. Adapting it to ren-c is (was :-) on my todo list, but you know, priorities ... So, thank you for doing it. I will check it out soonish.
 
 
2 hours later…
5:55 AM
I included Rebol3 on a benchmark of interpreter startup times, I'll probably add ren-c here in a bit. gist.github.com/acook/6420543
Okay, updated with ren-c
The purpose of the benchmark is to test for command responsiveness. The original impetus was for writing quick-executing scripts which could be used to generate prompts (in bash, zsh, fish or these days in powershell) with very low latency.
Much to my surprise, ren-c's init/quit cycle is phenomenally slower than r3, and is in fact much slower than any other interpreter's startup time except Ruby.
I'm really curious as to why that might be.
 
6:19 AM
@AnthonyMichaelCook Did you build a release build?
I would hardly be surprised if you built a debug build and it was slow. :-)
 
I built every interpreter according to their defaults
 
I do ask people, unless they have a good profiling reason to do so, to do debug builds. Because it is more informative. But if you insist on doing a performance test, please do an -O2 -DNDEBUG
Ren-C is more complex in general than R3-Alpha, and I've fought tooth and nail to make the sophistication not cost orders of magnitude in performance.
It was forked from Atronix, which was forked from Saphirion, which meant a bit of baggage to start with. The choice to build from a de-GUI'd version of their work was deliberate. It irked earl and others who thought Saphirion and Atronix had "heavied" things up, but I felt the long term success would be best bet on industry.
 
Is there a release tag in the makefile? I don't see one.
 
@AnthonyMichaelCook Anyway, if you modify the makefile, use a "-DNDEBUG -O2" build, and see if it truly is worse.
If you are using CMake, but you probably aren't.
@AnthonyMichaelCook Depending on your familiarity with GNU make, or not, there are two lines you might pay attention to. RAPI_FLAGS and HOST_FLAGS would be the ones I'd suggest, and if you don't add -DNDEBUG and switch whatever -O setting you are set to to -O2, it's an unfair comparison.
 
Yeah I found it
The change was statistically insignificant
 
6:30 AM
@AnthonyMichaelCook Well did you make clean etc?
I guess if you want to do a profiling thing, and ask why one thing is faster or slower than another, I'm game for it.
Fact is, I've studied the thing pretty well.
 
At least it doesn't take long to recompile
 
And I know, there's overhead, of doing things correctly. See Atronix Slide Deck. I've kcachegrinded the thing into the ground, really.
 
I ran make clean, I'm using the latest code from github.
 
Ok, so what's your profiling test?
 
The source code is linked above. It only tests startup/teardown.
It's basically ren-c --do "quit"
 
6:34 AM
Ok, well, I can optimize for that metric.
But I won't.
Why do you care about that?
 
I explained it above.
It's for embedding in something that needs low latency. The first use case I had was for displaying prompts on the commandline.
It's a common enough concern for command-line utilities, but I think only Bash and Perl have explicitly optimized for it. Lua, which I just added to the suite today, really surprised me too.
 
Well, it's a new test. I guess, trying to make the --do "quit" case fast is something that could be added in the "realm of concern"
 
The purpose is just to see the speed an interpreter can set up and tear down. It's the overhead cost of doing business with that interpreter.
 
@AnthonyMichaelCook FWIW, R3-Alpha had no concept of "tear down"
e.g. no ability to clean up after itself.
 
It's hard to notice the latency in any of the interpreters that rank above Python, it seems virtually instantaneous.
 
6:40 AM
You couldn't embed it, and shut it down, and spin it up, with guaranteed balance of memory etc.
 
The OS does the cleanup in this case, but I can see how that would concern ren-c where it wouldn't concern r3.
 
Well, the point was to be able to be inited and shut down. Zero leaks.
And that's not free, but, it also shouldn't cost that much so if you've come back after a year or so of silence and decided to introduce a new benchmark, ok. But give us a bit of time to process the new benchmark.
Also, I'm on vacation.
 
I'm certainly not demanding anything of you, I was just sharing the table for anyone who might be interested in interpreter startup times. I added ren-c after I posted it, an hour ago, with no ulterior motive. But it did make me curious when I saw it.
 
@AnthonyMichaelCook Well, I'm ok with it being in the test suite, I just hadn't really thought of it as relevant yet.
I can do profiling specifically on the do-nothing-but-quit case, and see what's happening.
@AnthonyMichaelCook Push Red on this, it's something they should look at too.
 
I know bash, perl, and lua optimize their startup times. Bash because so many shells get created and perl because it's used for string processing from the commandline a lot, while lua because it doesn't want to be accused of slowing down the host process. ren-c has some overlap with perl and lua in those respects, so it might be something worth considering.
I don't think it's an end or world scenario or high priority. For the narrow case of having it in my PROMPT_COMMAND/precmd I'd probably use r3-alpha.
Hmm, let me see if I have Red laying around here.
 
6:54 AM
@AnthonyMichaelCook Well if startup/shutdown of Ren-C is significantly lower than that of R3-Alpha, it becomes a point of study for me, when I have... study time. I don't think there's anything really intrinsic that should slow that down.
I'll look at it, but it is 1:00 AM and I'm traveling...
So, maybe I won't look at it tonight or tomorrow, but I will look at it.
 
I should also add Wren and some of the other scripting languages I have around here to the table.
Red isn't a perfect match because I can't run it inline, but I can compare a binary versus clang.
Ouch. Red takes a pretty big hit too. Only slightly faster than Python in this test.
 
@AnthonyMichaelCook Well, I will put the benchmark in the list of "things someone might consider a reason to care about a programming language". And see what I can do, and let you know. Got to sign off now though, g'nite.
 
@HostileFork No worries. Sleep well.
 
 
3 hours later…
10:15 AM
Beginners question (to answer on https://github.com/metaeducation/ren-c/blob/master/README.md ?)
When I followed this instruction ( make -f makefile.boot ) on this Windows machine I happened to pass by I got:
'make' is not recognized as an internal or external command,
operable program or batch file.
 
 
3 hours later…
12:58 PM
@iArnold Windows does not include linux commands by default. Generally, I believe people use MinGW, and with that installed it would be mingw32-make -f makefile.boot
 
@iArnold or use Cygwin
 
 
5 hours later…
 
1 hour later…
7:27 PM
@kealist Thank you Kealist and Giulio!
 
 
4 hours later…
11:10 PM
@AnthonyMichaelCook Looking at the profiling information, there's no particular smoking gun for why Ren-C would take longer than R3-Alpha, it's probably just due to being bigger.
Something that will slow down a Rebol or Red which won't affect things like Python is that there's a bunch of code (the mezzanine) that needs to get LOADed and executed to bootstrap the system. It would be possible to pre-load that into a VM image of some sort, and people have talked about there being such a thing...to snapshot the state of the system.
But really, most of the time is scanning in a bunch of words and building the series structures for the mezzanine and bootstrap. You can see all that in the file %boot-code.r
 
Were there changes in the parser or load that could have created a tiny impact on its own, but when combined with the increased bootstrapping it'd create a lot more churn?
 
@AnthonyMichaelCook I think I referred you to the slides I presented at Atronix. There are a lot of changes. And if you want a basis for comparison you should start from Saphir or Atronix's pre-Ren-C. I imagine mostly it's just LOADing and DOing more code in that %boot-code.r.
We could likely speed some things up by doing more of that on-demand.
But there's no single thing that's sticking out as an obvious "hey, why is that taking up that big percent of time". Looks pretty sensible.
I have wondered about a deferred form of function, which just holds onto the spec and body, and does the body relativization on the first call.
It's possible to do that without adding overhead to all function calls, given the current design.
Anyway, I saw roughly twice as long to run --do "quit" vs. R3-Alpha, and I don't find that too surprising. It just does more stuff. <shrug>
You could go through things like not LOADing the r3-legacy support, or get rid of HTTPS, or whatever, and if you kept that up you could probably get it to be about the same speed.
 
11:27 PM
I'm definitely seeing more like 4.5x increase in initialization time.
 
Post your makefile on a gist or something
 
I'd forgotten about ren-c pulling so much from the 3rd party vendors, that does explain a lot.
It's odd that ren-c doesn't include a release option in the makefile.
 
Intentional. I want asserts.
Unless you have a really good reason not to be running with asserts, I would like the messages.
We've had a bit of fits and starts of people shifting to a new make system that would be better, e.g. CMake, or a Rebol-driven make
But nothing has landed, so really the makefile as it is hasn't been touched too much.
 
Interesting
Running make apparently rebuilds the makefile
Which deletes the -DNDEBUG -O2
 
Running make -f makefile.boot, yes. But if you do make clean and make it shouldn't.
 
11:37 PM
Of course.
 
11:50 PM
I was thinking of func [x [integer!]] [...] being implemented as func [x] [check-type 'x [integer!] ...], which raises a question about intent. If you have a spec block of things specified by words like integer!, is it your intent that it type check against the underlying value at that time or whatever the word is bound to at the time of call?
If you change integer! to something else, should it check that? Should the error message be based on the word you used? How does this affect user-defined types?
This affects the idea of deferred function building, because you'd need to at least dereference the types at the moment the FUNC is built, to snapshot them...as they might change between the build moment and the first call.
 

« first day (2124 days earlier)      last day (1656 days later) »