GithubHelp home page GithubHelp logo

Comments (4)

wstaelens avatar wstaelens commented on May 24, 2024

@sambitdash can you explain more how you can "vectorize" this to make it a vector operation?

from pdfio.jl.

sambitdash avatar sambitdash commented on May 24, 2024

The vector operation code generation is to be carried out by the compiler not human optimized as the code needs to be run on varied disparate processors. Most processors support vector operations like SIMD if the code does not have unnecessary branching. However, if you are look at the byte operation code it's full of branching. A sample code for this can be seen in the comment:

JuliaLang/julia#23267 (comment)

However, the generated code was not reviewed for potential further optimizations. Hope this explains what is needed.

Also note that you may not need error handling in stream operations but can repair errors as streams may have corrupt data. So error recovery may be desirable than exit on failure.

from pdfio.jl.

sambitdash avatar sambitdash commented on May 24, 2024

This may not be needed as PDF spec does not mandate the streams to have even number of hexits. It can also have control characters like CR-LF. So the branching may be significantly higher. Closing now.

from pdfio.jl.

sambitdash avatar sambitdash commented on May 24, 2024

Current implementation is about 60ms for a 10Mb stream on i7 processor.

Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)

from pdfio.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.