Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xform inputs from Perl values being made into ndarrays too soon, and thus having a type assigned that requires converting #530

Open
4 tasks
mohawk2 opened this issue Jan 25, 2025 · 0 comments

Comments

@mohawk2
Copy link
Member

mohawk2 commented Jan 25, 2025

  • The XS code part of xforms could be enhanced to analyse the supplied Perl parameters, and use the xform spec to determine the required type for each. It could then make ndarrays out of the Perl values with the required type, avoiding the need for conversion.
  • A further benefit from that would be in generating versions of readdata (backward dataflow wouldn't make sense) that only processed Perl SVs, which would avoid overhead in the Perl-value-only scenario (and allow removing the PMCode for log10).

Other thoughts

  • For generated redodims/readdata/writebackdata functions, they should merge the indx and either long or longlong case, since they are functionally identical and it's a bit less code to generate.
  • non-[o] OtherPars should be copied into stack vars at the start of r/w functions, and be forced as rvalues.
@mohawk2 mohawk2 changed the title The XS code part of xforms could be enhanced to analyse the supplied Perl parameters, and use the xform spec to determine the required type for each. It could then make ndarrays out of the Perl values with the required type, avoiding the need for conversion. xforms should use their spec to analyse the supplied Perl parameters, determine the required type for each Jan 25, 2025
@mohawk2 mohawk2 changed the title xforms should use their spec to analyse the supplied Perl parameters, determine the required type for each xform inputs from Perl values being made into ndarrays too soon, and thus having a type assigned that requires converting Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant