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

SFunction inefficient implementation #1

Open
telephon opened this issue Apr 4, 2014 · 2 comments
Open

SFunction inefficient implementation #1

telephon opened this issue Apr 4, 2014 · 2 comments

Comments

@telephon
Copy link

telephon commented Apr 4, 2014

SFunction implements value like this :

   value{ arg ...args;
      ^function.inEnvir( envir ).value( *args );
   }

   valueArray{ arg ...args;
        ^function.inEnvir( envir ).value( *(args.unbubble) );
    }

This is extremely complicated and inefficient, the following should be enough:

 value{ arg ...args;
      ^envir.use { function.valueArray(args) }
   }

also valueArray should take an array as argument:

   valueArray{ arg args; // not ... args
         ^envir.use { function.valueArray(args) }
    }
@sensestage
Copy link
Contributor

It has been a while since I made the implementation, but I seem to
recall that envir.use somehow did not work correctly, or the envir was
passed as the first argument or something.

Did you test with the changed implementation?

sincerely,
Marije

On 04-04-14 12:21, Julian Rohrhuber wrote:

SFunction implements |value| like this :

| value{ arg ...args;
^function.inEnvir( envir ).value( *args );
}

valueArray{ arg ...args;
^function.inEnvir( envir ).value( *(args.unbubble) );
}
|

This is extremely complicated and inefficient, the following should be
enough:

| value{ arg ...args;
^envir.use { function.valueArray(args) }
}

|
|

also valueArray should take an array as argument:

| valueArray{ arg args; // not ... args
^envir.use { function.valueArray(args) }
}
|


Reply to this email directly or view it on GitHub
#1.

@telephon
Copy link
Author

telephon commented Apr 4, 2014

No, I haven't tested it. But I am pretty sure just from reading. Maybe the other mistake (...args in valueArray) caused the problem?

also value( *(args.unbubble) ) is exactly the same as valueArray(args)

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

2 participants