grep   4799

« earlier    

GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern
ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern while respecting your gitignore rules. ripgrep has first class support on Windows, macOS and Linux, with binary downloads available for every release. ripgrep is similar to other popular search tools like The Silver Searcher, ack and grep.

https://blog.burntsushi.net/ripgrep/
https://github.com/BurntSushi/ripgrep/issues/86
GitHub  regex  search  grep  Rust 
3 days ago by coffeebucket
stealth/grab: experimental and very fast implementation of a grep
parallel variant of grep optimized for SSD's and large directory tree searches
grep  variant  parallel  search  string  match  SSD  optimization  CLI  high  performance  linux 
7 days ago by asteroza
grep lower case upper case sequence manipulation - Google Groups
05/16/2018 - Insert space between lowercase character and uppercase character in BBEdit text file.
Grep  TextWrangler  Text 
8 days ago by zmtiger
Using a GREP search to add a space between a lo... | Adobe Community
05/16/2018 - Using Grep in BBEdite to find and insert a space before a capitalized letter.
Grep  Text  TextWrangler 
8 days ago by zmtiger
Is Prefix Of String In Table? A Journey Into SIMD String Processing.
TL;DR

Wrote some C and assembly code that uses SIMD instructions to perform prefix matching of strings. The C code was between 4-7x faster than the baseline implementation for prefix matching. The assembly code was 9-12x faster than the baseline specifically for the negative match case (determining that an incoming string definitely does not prefix match any of our known strings). The fastest negative match could be done in around 6 CPU cycles, which is pretty quick. (Integer division, for example, takes about 90 cycles.)

Overview

Goal: given a string, determine if it prefix-matches a set of known strings as fast as possible. That is, in a set of known strings, do any of them prefix match the incoming search string?

A reference implementation was written in C as a baseline, which simply looped through an array of strings, comparing each one, byte-by-byte, looking for a prefix match. Prefix match performance ranged from 28 CPU cycles to 130, and negative match performance was around 74 cycles.

A SIMD-friendly C structure called STRING_TABLE was derived. It is optimized for up to 16 strings, ideally of length less than or equal 16 characters. The table is created from the set of known strings up-front; it is sorted by length, ascending, and a unique character (with regards to other characters at the same byte offset) is then extracted, along with its index. A 16 byte character array, STRING_SLOT, is used to capture the unique characters. A 16 element array of unsigned characters, SLOT_INDEX, is used to capture the index. Similarly, lengths are stored in the same fashion via SLOT_LENGTHS. Finally, a 16 element array of STRING_SLOTs is used to capture up to the first 16 bytes of each string in the set.
algorithm  grep  optimization  cs 
10 days ago by euler

« earlier    

related tags

2018  ack  advanced  ag  algorithm  algorithms  all  alternative  alternatives  analyzer  ascii  assembly  at  awk  backslash  bash  bbedit  binary  blog  by  c++  c  case  characters  cheatsheet  check  cidr  cli  cmdlet  code  color  command-line  command  commandline  commands  comparison  compromised  containing  converter  counsel  cs  csv  data  database  defaults  development  devtools  dfir  documentation  emacs  environment  errormessage  escape  example  examples  explanation  expression  expressions  fast  file  files  filter  find  floss  for  formatting  foss  git  github  gnu  go  golang  graph  grep_color  grep_colors  grep_howto  grep_options  grepcidr  gron  guide  hacked  hacking  hadoop  high  howto  humanreadable  imporant  index  inspect  ip  ivy  javascript  jq  json  key  keys  line  linux  lucene  macos  macosx  macworld  manual  match  matching  mysql  network  non-ascii  non  obfuscate  one  online  opensores  opensource  optimization  options  out  output  parallel  parse  pattern  pcre  pentesting  performance  phdchat  php  platinum_searcher  post  powershell  prefix  preformance  processing  programming  programming:shell  pt  query  reference  regex  regexp  regular  remove  replace  rg  ripgrep  rq  rust  search  security  sed  select  sensitivity  shell  shellscripting  silver_searcher  silversearcher  simd  software  solution  speed  sql  ssd  stackexchange  stackoverflow  string  suspicious  terminal  test  text-interface  text  textql  textwrangler  thegeekstuff  time  tips  tolearn  tool  tools  toread  totry  tounderstand  tutorial  unicode  unix.stackexchange  unix  useless.cat  utf8  utility  utils  variable  variables  variant  workaround 

Copy this bookmark:



description:


tags: