GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — intersect performance · Issue #143 · Rcpp11/Rcpp11

intersect performance #143

New issue
Copy link
New issue
Copy link
Open
Open
intersect performance#143
Copy link
Labels
performance

Description

@romainfrancois
romainfrancois
opened on Apr 12, 2014
Issue body actions

is pretty bad. http://stackoverflow.com/questions/23014909/intersect-function-with-rcpp

Activity

  1. romainfrancois
    added
    performance
    on Apr 12, 2014
  2. kevinushey commented on Apr 13, 2014

    @kevinushey
    kevinushey
    on Apr 13, 2014
    Contributor
    More actions

    Personally, I think there should be less use of STL containers in sugar when possible. It's expensive to copy from R, to STL, and back again.

    That said, can we re-write intersect to leverage other sugar functions? E.g. we could implement something like

    IntegerVector matches = match(lhs, rhs);
    LHS_T res = y[matches];
    return unique(res);

    which follows from the R implementation, and hence we only need efficient match and unique routines.

  3. romainfrancois commented on Apr 13, 2014

    @romainfrancois
    romainfrancois
    on Apr 13, 2014
    ContributorAuthor
    More actions

    except y[matches] is not implemented. I know you have it in Rcpp and have proposal for it here, but I still don't think I want it, to avoid the 0-based / 1-based confusion.

    In that case, I'd like to find out what the problem is, what is slow, etc ...

  4. kevinushey commented on Apr 13, 2014

    @kevinushey
    kevinushey
    on Apr 13, 2014
    Contributor
    More actions

    Consider adding it for the LogicalVector / CharacterVector cases though.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.