The [WordCount] thread caused me to play around with the solutions to see 
whether I could see anything else that can be tweaked, I tried a few things 
but they didn't improve performance, but it was fun anyway.

Then I though I could try the macro stepper and look at the expansion of 
[crowdsourced].
I disabled macro hiding and stepped to the end.
There I saw if statements with a condition that is `(quote #t)` with a 
little lock symbol before it.

I would like to understand why those terms aren't reduced further.
Are they placeholders and are replaced and resolved at a later time?

terms copied (without the lock symbol) from the macro stepper
(if (if '#t (#%app not '#f) '#f)
  (#%app for-loop (#%app unsafe-fx+ '1 pos))
  (#%app values))

>From a naive standpoint I would expect it to be simplified:
(if '#t (#%app not '#f) '#f) -> (#%app not '#f)

(if (#%app not '#f)
  (#%app for-loop (#%app unsafe-fx+ '1 pos))
  (#%app values))

So expressed another way: why isn't the if with boolean literal as 
condition reduced to the corresponding branch? Or does this happen, just 
isn't shown in the macro stepper? 
What am I misunderstanding here?

If there aren't simplifications like that, what is preventing them or 
making them not worthwhile?


[WordCount] 
https://groups.google.com/g/racket-users/c/lGA60P6jboY/m/2ZLDAunBBgAJ
[crowdsourced] 
https://gist.github.com/Bogdanp/b9256e1a91de9083830cb616b3659ff8

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/fce863fe-85d7-44a6-a2ba-5778df40e6bfn%40googlegroups.com.

Reply via email to