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

Speedup of valid_field() #18

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@okomarov

okomarov commented Dec 24, 2015

Dropping the unicode2native() since Matlab uses the first 65536 unicode points internally (see http://uk.mathworks.com/matlabcentral/answers/63980-how-to-access-unicode-strings-through-mex-engine-c-interfaces)

Also, caching isOctave() into a private function, which would eventually help to disentangle things in the future (i.e. drop global variables) and gain more speedup.

On my system valid_field() executes in about 4 seconds instead of 20, i.e. a 5x speedup.

@fangq

This comment has been minimized.

Show comment
Hide comment
@fangq

fangq Jan 22, 2016

Owner

sorry for the delay in responding to this pull request. I am curious, how much improvement did you get by moving isoct to a separate function? also, do you know if the changes are compatible with octave (3.2 and later)?

Owner

fangq commented Jan 22, 2016

sorry for the delay in responding to this pull request. I am curious, how much improvement did you get by moving isoct to a separate function? also, do you know if the changes are compatible with octave (3.2 and later)?

@okomarov

This comment has been minimized.

Show comment
Hide comment
@okomarov

okomarov Jan 28, 2016

I got approximately a 2x speedup, but I would stress that the purpose of the function is to introduce a layer between the implementation and cross platform compatibility.

It should be comaptible with Octave but I have not tested. I looked up that the functions I used are also supported by Octave. Support back to version 3.2, can't be sure.

I am currently a bit short on time, so dont know when ill get a chance to check that out.

Also, since R2015a there is undocumented support for matlab.internal.webservices.toJSON() and matlab.internal.webservices.fromJSON().

okomarov commented Jan 28, 2016

I got approximately a 2x speedup, but I would stress that the purpose of the function is to introduce a layer between the implementation and cross platform compatibility.

It should be comaptible with Octave but I have not tested. I looked up that the functions I used are also supported by Octave. Support back to version 3.2, can't be sure.

I am currently a bit short on time, so dont know when ill get a chance to check that out.

Also, since R2015a there is undocumented support for matlab.internal.webservices.toJSON() and matlab.internal.webservices.fromJSON().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment