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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes #13

Merged
merged 2 commits into from Jun 27, 2017
Merged

Small changes #13

merged 2 commits into from Jun 27, 2017

Conversation

niklas88
Copy link
Member

Here are my changes to StringUtils and the JavaScript. I'm not super sure whether the templated join function is a bit too funky, however at least it does have a Test 馃帀

Doing a quick search it looks like none of this is used during index construction so the performance benefits are likely tiny but oh well...

Also there is some reformatting for Google Style Guide in StringUtils.h

Query strings may use '+' to escape spaces and this may also be generated by
some URL libraries (e.g. http://golang.org/pkg/net/url). These are already
supported in the QLever API but were incorrectly decoded in the test UI.

This allows pasting such querys into the UI for further experimentation.
Instead of a HashMap just use an appropriately sized array on the stack,
this should be quite a bit faster (alloc on stack is often just a
pointer bump). Also 256 bytes leaves plenty of room on a default
size stack.

Also add a join function similiar to Python's string.join(). I got a bit
crazy here and it's in fact a template that works with anything
supporting operator+=

We may want to use template functions in the futue to get rid of
variants with different types too.

This also synchronizes with my ad::util variant
@Buchhold Buchhold merged commit 36aef6d into ad-freiburg:master Jun 27, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants