Following up from #4508 (comment)
R is also having read-only pointers that are const (e.g. INTEGER_RO -> const int*).
Should we try and adopt using this internally?
Considerations:
- Is this in the API? I don't see any of my other GitHub clones using it
- Is it back-compatible? Need to check r-source history
- Is there any measurable payoff?
Basic look at the potential effort for combing over the current source:
SEXPTYPE |
count in src |
| LOGICAL |
161 |
| INTEGER |
424 |
| REAL |
189 |
| COMPLEX |
48 |
Details
code to generate table:
echo "| \`SEXPTYPE\` | count in \`src\` |" && \
echo "| ---------- | -------------- |" && \
for type in LOGICAL INTEGER REAL COMPLEX
do echo "| $type |" $(grep -Fr "$type(" src | wc -l) "|"
done
Following up from #4508 (comment)
R is also having read-only pointers that are
const(e.g.INTEGER_RO->const int*).Should we try and adopt using this internally?
Considerations:
Basic look at the potential effort for combing over the current source:
SEXPTYPEsrcDetails
code to generate table: