How can a C function return a local array in M?

45 views
Skip to first unread message

Kurt Le Breton

unread,
Apr 30, 2025, 9:49:45 AMApr 30
to Everything MUMPS

Hi all,

I'm working on a system where M is currently used to parse JSON input into a local array structure. My current M implementation processes about 2MB/sec, which is about all I can squeeze out of M, but I'm hoping to increase performance by rewriting the parser in C.

What I’d like to do is have a C function that returns a fully populated local array in M. Something like:

s *nodes = $zjson("{""json"":""object string here""}")

I’m looking at the documentation on how to setup an external C library, but I’m not sure how it’s possible to return a local variable array from C back into M.

Is there any way to do this? Has anyone done something similar, or would this require modifying YottaDB itself?

Any guidance or ideas welcome.

Thanks,
Kurt


Sam Habiel

unread,
Apr 30, 2025, 10:43:59 AMApr 30
to Kurt Le Breton, Everything MUMPS
Kurt,

If you are talking about YottaDB, there is an MR in progress that does what I think you want:


> Is there any way to do this? Has anyone done something similar, or would this require modifying YottaDB itself?

--
You received this message because you are subscribed to the Google Groups "Everything MUMPS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to everythingmum...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/everythingmumps/25381278-c9eb-49e7-b61f-880c98bd9e78n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kurt Le Breton

unread,
Apr 30, 2025, 11:11:58 AMApr 30
to Everything MUMPS
Thanks Sam,

Yes I was thinking specifically about YottaDB, I'll be more specific next time.
Thanks for the direction to use simple api, I'll give it a closer look.
Reply all
Reply to author
Forward
0 new messages